]> Git Repo - linux.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
authorLinus Torvalds <[email protected]>
Wed, 23 May 2012 22:59:10 +0000 (15:59 -0700)
committerLinus Torvalds <[email protected]>
Wed, 23 May 2012 22:59:10 +0000 (15:59 -0700)
Pull crypto updates from Herbert Xu:
 - New cipher/hash driver for ARM ux500.
 - Code clean-up for aesni-intel.
 - Misc fixes.

Fixed up conflicts in arch/arm/mach-ux500/devices-common.h, where quite
frankly some of it made no sense at all (the pull brought in a
declaration for the dbx500_add_platform_device_noirq() function, which
neither exists nor is used anywhere).

Also some trivial add-add context conflicts in the Kconfig file in
drivers/{char/hw_random,crypto}/

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: aesni-intel - move more common code to ablk_init_common
  crypto: aesni-intel - use crypto_[un]register_algs
  crypto: ux500 - Cleanup hardware identification
  crypto: ux500 - Update DMA handling for 3.4
  mach-ux500: crypto - core support for CRYP/HASH module.
  crypto: ux500 - Add driver for HASH hardware
  crypto: ux500 - Add driver for CRYP hardware
  hwrng: Kconfig - modify default state for atmel-rng driver
  hwrng: omap - use devm_request_and_ioremap
  crypto: crypto4xx - move up err_request_irq label
  crypto, xor: Sanitize checksumming function selection output
  crypto: caam - add backward compatible string sec4.0

1  2 
arch/arm/mach-ux500/board-mop500.c
arch/arm/mach-ux500/clock.c
arch/arm/mach-ux500/devices-common.h
arch/arm/mach-ux500/devices-db8500.h
arch/arm/mach-ux500/include/mach/devices.h
arch/arm/mach-ux500/include/mach/hardware.h
drivers/char/hw_random/Kconfig
drivers/crypto/Kconfig

index 4bc0cbc5f071062c5a817ea59cbb09ba256e1f21,67e657e24b1d99f084635993ddc94ca5dd25d4cb..f943687acaf0e214d1bebc4ed317976c0b640cb5
@@@ -1,4 -1,3 +1,4 @@@
 +
  /*
   * Copyright (C) 2008-2009 ST-Ericsson
   *
  #include <linux/smsc911x.h>
  #include <linux/gpio_keys.h>
  #include <linux/delay.h>
 -
 +#include <linux/of.h>
 +#include <linux/of_platform.h>
  #include <linux/leds.h>
 +#include <linux/pinctrl/consumer.h>
 +
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
  #include <asm/hardware/gic.h>
  
  #include <plat/i2c.h>
  #include <plat/ste_dma40.h>
 -#include <plat/pincfg.h>
  #include <plat/gpio-nomadik.h>
  
  #include <mach/hardware.h>
  #include <mach/setup.h>
  #include <mach/devices.h>
  #include <mach/irqs.h>
+ #include <mach/crypto-ux500.h>
  
 -#include "pins-db8500.h"
  #include "ste-dma40-db8500.h"
  #include "devices-db8500.h"
  #include "board-mop500.h"
  #include "board-mop500-regulators.h"
 +#include "board-mop500-msp.h"
  
  static struct gpio_led snowball_led_array[] = {
        {
@@@ -417,6 -415,45 +418,45 @@@ static void mop500_prox_deactivate(stru
        regulator_put(prox_regulator);
  }
  
+ static struct cryp_platform_data u8500_cryp1_platform_data = {
+               .mem_to_engine = {
+                               .dir = STEDMA40_MEM_TO_PERIPH,
+                               .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
+                               .dst_dev_type = DB8500_DMA_DEV48_CAC1_TX,
+                               .src_info.data_width = STEDMA40_WORD_WIDTH,
+                               .dst_info.data_width = STEDMA40_WORD_WIDTH,
+                               .mode = STEDMA40_MODE_LOGICAL,
+                               .src_info.psize = STEDMA40_PSIZE_LOG_4,
+                               .dst_info.psize = STEDMA40_PSIZE_LOG_4,
+               },
+               .engine_to_mem = {
+                               .dir = STEDMA40_PERIPH_TO_MEM,
+                               .src_dev_type = DB8500_DMA_DEV48_CAC1_RX,
+                               .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
+                               .src_info.data_width = STEDMA40_WORD_WIDTH,
+                               .dst_info.data_width = STEDMA40_WORD_WIDTH,
+                               .mode = STEDMA40_MODE_LOGICAL,
+                               .src_info.psize = STEDMA40_PSIZE_LOG_4,
+                               .dst_info.psize = STEDMA40_PSIZE_LOG_4,
+               }
+ };
+ static struct stedma40_chan_cfg u8500_hash_dma_cfg_tx = {
+               .dir = STEDMA40_MEM_TO_PERIPH,
+               .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
+               .dst_dev_type = DB8500_DMA_DEV50_HAC1_TX,
+               .src_info.data_width = STEDMA40_WORD_WIDTH,
+               .dst_info.data_width = STEDMA40_WORD_WIDTH,
+               .mode = STEDMA40_MODE_LOGICAL,
+               .src_info.psize = STEDMA40_PSIZE_LOG_16,
+               .dst_info.psize = STEDMA40_PSIZE_LOG_16,
+ };
+ static struct hash_platform_data u8500_hash1_platform_data = {
+               .mem_to_engine = &u8500_hash_dma_cfg_tx,
+               .dma_filter = stedma40_filter,
+ };
  /* add any platform devices here - TODO */
  static struct platform_device *mop500_platform_devs[] __initdata = {
        &mop500_gpio_keys_device,
@@@ -443,7 -480,7 +483,7 @@@ static struct stedma40_chan_cfg ssp0_dm
  };
  #endif
  
 -static struct pl022_ssp_controller ssp0_platform_data = {
 +static struct pl022_ssp_controller ssp0_plat = {
        .bus_id = 0,
  #ifdef CONFIG_STE_DMA40
        .enable_dma = 1,
  
  static void __init mop500_spi_init(struct device *parent)
  {
 -      db8500_add_ssp0(parent, &ssp0_platform_data);
 +      db8500_add_ssp0(parent, &ssp0_plat);
  }
  
  #ifdef CONFIG_STE_DMA40
@@@ -520,6 -557,14 +560,6 @@@ static struct stedma40_chan_cfg uart2_d
  };
  #endif
  
 -
 -static pin_cfg_t mop500_pins_uart0[] = {
 -      GPIO0_U0_CTSn   | PIN_INPUT_PULLUP,
 -      GPIO1_U0_RTSn   | PIN_OUTPUT_HIGH,
 -      GPIO2_U0_RXD    | PIN_INPUT_PULLUP,
 -      GPIO3_U0_TXD    | PIN_OUTPUT_HIGH,
 -};
 -
  #define PRCC_K_SOFTRST_SET      0x18
  #define PRCC_K_SOFTRST_CLEAR    0x1C
  static void ux500_uart0_reset(void)
        udelay(1);
  }
  
 +/* This needs to be referenced by callbacks */
 +struct pinctrl *u0_p;
 +struct pinctrl_state *u0_def;
 +struct pinctrl_state *u0_sleep;
 +
  static void ux500_uart0_init(void)
  {
        int ret;
  
 -      ret = nmk_config_pins(mop500_pins_uart0,
 -                      ARRAY_SIZE(mop500_pins_uart0));
 -      if (ret < 0)
 -              pr_err("pl011: uart pins_enable failed\n");
 +      if (IS_ERR(u0_p) || IS_ERR(u0_def))
 +              return;
 +
 +      ret = pinctrl_select_state(u0_p, u0_def);
 +      if (ret)
 +              pr_err("could not set UART0 defstate\n");
  }
  
  static void ux500_uart0_exit(void)
  {
        int ret;
  
 -      ret = nmk_config_pins_sleep(mop500_pins_uart0,
 -                      ARRAY_SIZE(mop500_pins_uart0));
 -      if (ret < 0)
 -              pr_err("pl011: uart pins_disable failed\n");
 +      if (IS_ERR(u0_p) || IS_ERR(u0_sleep))
 +              return;
 +
 +      ret = pinctrl_select_state(u0_p, u0_sleep);
 +      if (ret)
 +              pr_err("could not set UART0 idlestate\n");
  }
  
  static struct amba_pl011_data uart0_plat = {
@@@ -598,35 -634,21 +638,41 @@@ static struct amba_pl011_data uart2_pla
  
  static void __init mop500_uart_init(struct device *parent)
  {
 -      db8500_add_uart0(parent, &uart0_plat);
 +      struct amba_device *uart0_device;
 +
 +      uart0_device = db8500_add_uart0(parent, &uart0_plat);
 +      if (uart0_device) {
 +              u0_p = pinctrl_get(&uart0_device->dev);
 +              if (IS_ERR(u0_p))
 +                      dev_err(&uart0_device->dev,
 +                              "could not get UART0 pinctrl\n");
 +              else {
 +                      u0_def = pinctrl_lookup_state(u0_p,
 +                                                    PINCTRL_STATE_DEFAULT);
 +                      if (IS_ERR(u0_def)) {
 +                              dev_err(&uart0_device->dev,
 +                                      "could not get UART0 defstate\n");
 +                      }
 +                      u0_sleep = pinctrl_lookup_state(u0_p,
 +                                                      PINCTRL_STATE_SLEEP);
 +                      if (IS_ERR(u0_sleep))
 +                              dev_err(&uart0_device->dev,
 +                                      "could not get UART0 idlestate\n");
 +              }
 +      }
        db8500_add_uart1(parent, &uart1_plat);
        db8500_add_uart2(parent, &uart2_plat);
  }
  
+ static void __init u8500_cryp1_hash1_init(struct device *parent)
+ {
+       db8500_add_cryp1(parent, &u8500_cryp1_platform_data);
+       db8500_add_hash1(parent, &u8500_hash1_platform_data);
+ }
  static struct platform_device *snowball_platform_devs[] __initdata = {
        &snowball_led_dev,
        &snowball_key_dev,
 -      &snowball_sbnet_dev,
        &ab8500_device,
  };
  
@@@ -638,10 -660,10 +684,10 @@@ static void __init mop500_init_machine(
  
        mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
  
 +      mop500_pinmaps_init();
        parent = u8500_init_devices();
  
 -      mop500_pins_init();
 -
 +      /* FIXME: parent of ab8500 should be prcmu */
        for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
                mop500_platform_devs[i]->dev.parent = parent;
  
        mop500_i2c_init(parent);
        mop500_sdi_init(parent);
        mop500_spi_init(parent);
 +      mop500_msp_init(parent);
        mop500_uart_init(parent);
  
+       u8500_cryp1_hash1_init(parent);
        i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
  
        i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
  static void __init snowball_init_machine(void)
  {
        struct device *parent = NULL;
 -      int i2c0_devs;
        int i;
  
 +      snowball_pinmaps_init();
        parent = u8500_init_devices();
  
 -      snowball_pins_init();
 -
        for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++)
                snowball_platform_devs[i]->dev.parent = parent;
  
        mop500_i2c_init(parent);
        snowball_sdi_init(parent);
        mop500_spi_init(parent);
 +      mop500_msp_init(parent);
        mop500_uart_init(parent);
  
 -      i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
 -      i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
 -      i2c_register_board_info(2, mop500_i2c2_devices,
 -                              ARRAY_SIZE(mop500_i2c2_devices));
 -
        /* This board has full regulator constraints */
        regulator_has_full_constraints();
  }
@@@ -701,9 -730,10 +749,9 @@@ static void __init hrefv60_init_machine
         */
        mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
  
 +      hrefv60_pinmaps_init();
        parent = u8500_init_devices();
  
 -      hrefv60_pins_init();
 -
        for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
                mop500_platform_devs[i]->dev.parent = parent;
  
        mop500_i2c_init(parent);
        hrefv60_sdi_init(parent);
        mop500_spi_init(parent);
 +      mop500_msp_init(parent);
        mop500_uart_init(parent);
  
        i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
@@@ -757,119 -786,3 +805,119 @@@ MACHINE_START(SNOWBALL, "Calao Systems 
        .handle_irq     = gic_handle_irq,
        .init_machine   = snowball_init_machine,
  MACHINE_END
 +
 +#ifdef CONFIG_MACH_UX500_DT
 +
 +struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
 +      /* Requires DMA and call-back bindings. */
 +      OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat),
 +      OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat),
 +      OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", &uart2_plat),
 +      /* Requires DMA bindings. */
 +      OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0",  &ssp0_plat),
 +      /* Requires clock name bindings. */
 +      OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e000, "gpio.0", NULL),
 +      OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e080, "gpio.1", NULL),
 +      OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e000, "gpio.2", NULL),
 +      OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e080, "gpio.3", NULL),
 +      OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e100, "gpio.4", NULL),
 +      OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e180, "gpio.5", NULL),
 +      OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e000, "gpio.6", NULL),
 +      OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e080, "gpio.7", NULL),
 +      OF_DEV_AUXDATA("st,nomadik-gpio", 0xa03fe000, "gpio.8", NULL),
 +      {},
 +};
 +
 +static const struct of_device_id u8500_local_bus_nodes[] = {
 +      /* only create devices below soc node */
 +      { .compatible = "stericsson,db8500", },
 +      { .compatible = "simple-bus"},
 +      { },
 +};
 +
 +static void __init u8500_init_machine(void)
 +{
 +      struct device *parent = NULL;
 +      int i2c0_devs;
 +      int i;
 +
 +      /* Pinmaps must be in place before devices register */
 +      if (of_machine_is_compatible("st-ericsson,mop500"))
 +              mop500_pinmaps_init();
 +      else if (of_machine_is_compatible("calaosystems,snowball-a9500"))
 +              snowball_pinmaps_init();
 +      else if (of_machine_is_compatible("st-ericsson,hrefv60+"))
 +              hrefv60_pinmaps_init();
 +
 +      parent = u8500_init_devices();
 +
 +      for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
 +              mop500_platform_devs[i]->dev.parent = parent;
 +      for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++)
 +              snowball_platform_devs[i]->dev.parent = parent;
 +
 +      /* automatically probe child nodes of db8500 device */
 +      of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent);
 +
 +      if (of_machine_is_compatible("st-ericsson,mop500")) {
 +              mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
 +
 +              platform_add_devices(mop500_platform_devs,
 +                              ARRAY_SIZE(mop500_platform_devs));
 +
 +              mop500_sdi_init(parent);
 +
 +              i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
 +              i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
 +              i2c_register_board_info(2, mop500_i2c2_devices,
 +                                      ARRAY_SIZE(mop500_i2c2_devices));
 +
 +      } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
 +              platform_add_devices(snowball_platform_devs,
 +                              ARRAY_SIZE(snowball_platform_devs));
 +
 +              snowball_sdi_init(parent);
 +      } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) {
 +              /*
 +               * The HREFv60 board removed a GPIO expander and routed
 +               * all these GPIO pins to the internal GPIO controller
 +               * instead.
 +               */
 +              mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
 +              platform_add_devices(mop500_platform_devs,
 +                              ARRAY_SIZE(mop500_platform_devs));
 +
 +              hrefv60_sdi_init(parent);
 +
 +              i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
 +              i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;
 +
 +              i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
 +              i2c_register_board_info(2, mop500_i2c2_devices,
 +                                      ARRAY_SIZE(mop500_i2c2_devices));
 +      }
 +      mop500_i2c_init(parent);
 +
 +      /* This board has full regulator constraints */
 +      regulator_has_full_constraints();
 +}
 +
 +static const char * u8500_dt_board_compat[] = {
 +      "calaosystems,snowball-a9500",
 +      "st-ericsson,hrefv60+",
 +      "st-ericsson,u8500",
 +      "st-ericsson,mop500",
 +      NULL,
 +};
 +
 +
 +DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)")
 +      .map_io         = u8500_map_io,
 +      .init_irq       = ux500_init_irq,
 +      /* we re-use nomadik timer here */
 +      .timer          = &ux500_timer,
 +      .handle_irq     = gic_handle_irq,
 +      .init_machine   = u8500_init_machine,
 +      .dt_compat      = u8500_dt_board_compat,
 +MACHINE_END
 +#endif
index a121cb472dd6876756eedc91853949b05a301de5,2efc1fe236c31fc514d4586c3434fae6696e90b7..1762c4728f1e24b3dd41881d1d145cbac31c7c49
@@@ -149,7 -149,9 +149,7 @@@ static unsigned long clk_mtu_get_rate(s
        unsigned long mturate;
        unsigned long retclk;
  
 -      if (cpu_is_u5500())
 -              addr = __io_address(U5500_PRCMU_BASE);
 -      else if (cpu_is_u8500())
 +      if (cpu_is_u8500_family())
                addr = __io_address(U8500_PRCMU_BASE);
        else
                ux500_unknown_soc();
@@@ -334,7 -336,6 +334,7 @@@ static DEFINE_PRCMU_CLK(uiccclk,   0x4, 1
   */
  
  /* Peripheral Cluster #1 */
 +static DEFINE_PRCC_CLK(1, msp3,               11, 10, &clk_msp1clk);
  static DEFINE_PRCC_CLK(1, i2c4,               10, 9, &clk_i2cclk);
  static DEFINE_PRCC_CLK(1, gpio0,      9, -1, NULL);
  static DEFINE_PRCC_CLK(1, slimbus0,   8,  8, &clk_slimclk);
@@@ -381,14 -382,15 +381,15 @@@ static DEFINE_PRCC_CLK(5, usb,          0,  0, 
  /* Peripheral Cluster #6 */
  
  /* MTU ID in data */
- static DEFINE_PRCC_CLK_CUSTOM(6, mtu1, 8, -1, NULL, clk_mtu_get_rate, 1);
- static DEFINE_PRCC_CLK_CUSTOM(6, mtu0, 7, -1, NULL, clk_mtu_get_rate, 0);
- static DEFINE_PRCC_CLK(6, cfgreg,     6,  6, NULL);
- static DEFINE_PRCC_CLK(6, hash1,      5, -1, NULL);
- static DEFINE_PRCC_CLK(6, unipro,     4,  1, &clk_uniproclk);
- static DEFINE_PRCC_CLK(6, pka,                3, -1, NULL);
- static DEFINE_PRCC_CLK(6, hash0,      2, -1, NULL);
- static DEFINE_PRCC_CLK(6, cryp0,      1, -1, NULL);
+ static DEFINE_PRCC_CLK_CUSTOM(6, mtu1, 9, -1, NULL, clk_mtu_get_rate, 1);
+ static DEFINE_PRCC_CLK_CUSTOM(6, mtu0, 8, -1, NULL, clk_mtu_get_rate, 0);
+ static DEFINE_PRCC_CLK(6, cfgreg,     7,  7, NULL);
+ static DEFINE_PRCC_CLK(6, hash1,      6, -1, NULL);
+ static DEFINE_PRCC_CLK(6, unipro,     5,  1, &clk_uniproclk);
+ static DEFINE_PRCC_CLK(6, pka,                4, -1, NULL);
+ static DEFINE_PRCC_CLK(6, hash0,      3, -1, NULL);
+ static DEFINE_PRCC_CLK(6, cryp0,      2, -1, NULL);
+ static DEFINE_PRCC_CLK(6, cryp1,    1, -1, NULL);
  static DEFINE_PRCC_CLK(6, rng,        0,  0, &clk_rngclk);
  
  static struct clk clk_dummy_apb_pclk = {
@@@ -404,7 -406,7 +405,7 @@@ static struct clk_lookup u8500_clks[] 
        CLK(slimbus0,   "slimbus0",     NULL),
        CLK(i2c2,       "nmk-i2c.2",    NULL),
        CLK(sdi0,       "sdi0",         NULL),
 -      CLK(msp0,       "msp0",         NULL),
 +      CLK(msp0,       "ux500-msp-i2s.0",      NULL),
        CLK(i2c1,       "nmk-i2c.1",    NULL),
        CLK(uart1,      "uart1",        NULL),
        CLK(uart0,      "uart0",        NULL),
        CLK(pka,        "pka",          NULL),
        CLK(hash0,      "hash0",        NULL),
        CLK(cryp0,      "cryp0",        NULL),
+       CLK(cryp1,  "cryp1",    NULL),
  
        /* PRCMU level clock gating */
  
        /* Peripheral Cluster #1 */
        CLK(i2c4,       "nmk-i2c.4",    NULL),
        CLK(spi3,       "spi3",         NULL),
 -      CLK(msp1,       "msp1",         NULL),
 +      CLK(msp1,       "ux500-msp-i2s.1",      NULL),
 +      CLK(msp3,       "ux500-msp-i2s.3",      NULL),
  
        /* Peripheral Cluster #2 */
        CLK(gpio1,      "gpio.6",       NULL),
        CLK(spi0,       "spi0",         NULL),
        CLK(sdi3,       "sdi3",         NULL),
        CLK(sdi1,       "sdi1",         NULL),
 -      CLK(msp2,       "msp2",         NULL),
 +      CLK(msp2,       "ux500-msp-i2s.2",      NULL),
        CLK(sdi4,       "sdi4",         NULL),
        CLK(pwl,        "pwl",          NULL),
        CLK(spi1,       "spi1",         NULL),
@@@ -705,6 -707,14 +707,6 @@@ late_initcall(clk_init_smp_twd_cpufreq)
  
  int __init clk_init(void)
  {
 -      if (cpu_is_u5500()) {
 -              /* Clock tree for U5500 not implemented yet */
 -              clk_prcc_ops.enable = clk_prcc_ops.disable = NULL;
 -              clk_prcmu_ops.enable = clk_prcmu_ops.disable = NULL;
 -              clk_uartclk.rate = 36360000;
 -              clk_sdmmcclk.rate = 99900000;
 -      }
 -
        clkdev_add_table(u8500_clks, ARRAY_SIZE(u8500_clks));
        clkdev_add(&clk_smp_twd_lookup);
  
index 7cbccfd9e158ae315602300a9e2ec6589afd6136,89c5a59b3295e0e0b725c50e9a70dc18a6986875..6e47065602669a3a4c720417137f768763c13363
  #include <linux/platform_device.h>
  #include <linux/dma-mapping.h>
  #include <linux/sys_soc.h>
 +#include <linux/amba/bus.h>
  #include <plat/i2c.h>
+ #include <mach/crypto-ux500.h>
  
 -extern struct amba_device *
 -dbx500_add_amba_device(struct device *parent, const char *name,
 -                     resource_size_t base, int irq, void *pdata,
 -                     unsigned int periphid);
 -
 -extern struct platform_device *
 -dbx500_add_platform_device_noirq(const char *name, int id,
 -              resource_size_t base, void *pdata);
 -
  struct spi_master_cntlr;
  
  static inline struct amba_device *
@@@ -21,8 -30,8 +22,8 @@@ dbx500_add_msp_spi(struct device *paren
                   resource_size_t base, int irq,
                   struct spi_master_cntlr *pdata)
  {
 -      return dbx500_add_amba_device(parent, name, base, irq,
 -                                    pdata, 0);
 +      return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0,
 +                                 pdata, 0);
  }
  
  static inline struct amba_device *
@@@ -30,8 -39,8 +31,8 @@@ dbx500_add_spi(struct device *parent, c
               int irq, struct spi_master_cntlr *pdata,
               u32 periphid)
  {
 -      return dbx500_add_amba_device(parent, name, base, irq,
 -                                    pdata, periphid);
 +      return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0,
 +                                 pdata, periphid);
  }
  
  struct mmci_platform_data;
@@@ -40,8 -49,8 +41,8 @@@ static inline struct amba_device 
  dbx500_add_sdi(struct device *parent, const char *name, resource_size_t base,
               int irq, struct mmci_platform_data *pdata, u32 periphid)
  {
 -      return dbx500_add_amba_device(parent, name, base, irq,
 -                                    pdata, periphid);
 +      return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0,
 +                                 pdata, periphid);
  }
  
  struct amba_pl011_data;
@@@ -50,7 -59,7 +51,7 @@@ static inline struct amba_device 
  dbx500_add_uart(struct device *parent, const char *name, resource_size_t base,
                int irq, struct amba_pl011_data *pdata)
  {
 -      return dbx500_add_amba_device(parent, name, base, irq, pdata, 0);
 +      return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, pdata, 0);
  }
  
  struct nmk_i2c_controller;
@@@ -81,25 -90,61 +82,74 @@@ dbx500_add_i2c(struct device *parent, i
  static inline struct amba_device *
  dbx500_add_rtc(struct device *parent, resource_size_t base, int irq)
  {
 -      return dbx500_add_amba_device(parent, "rtc-pl031", base, irq, NULL, 0);
 +      return amba_apb_device_add(parent, "rtc-pl031", base, SZ_4K, irq,
 +                              0, NULL, 0);
  }
  
+ struct cryp_platform_data;
+ static inline struct platform_device *
+ dbx500_add_cryp1(struct device *parent, int id, resource_size_t base, int irq,
+               struct cryp_platform_data *pdata)
+ {
+       struct resource res[] = {
+                       DEFINE_RES_MEM(base, SZ_4K),
+                       DEFINE_RES_IRQ(irq),
+       };
+       struct platform_device_info pdevinfo = {
+                       .parent = parent,
+                       .name = "cryp1",
+                       .id = id,
+                       .res = res,
+                       .num_res = ARRAY_SIZE(res),
+                       .data = pdata,
+                       .size_data = sizeof(*pdata),
+                       .dma_mask = DMA_BIT_MASK(32),
+       };
+       return platform_device_register_full(&pdevinfo);
+ }
+ struct hash_platform_data;
+ static inline struct platform_device *
+ dbx500_add_hash1(struct device *parent, int id, resource_size_t base,
+               struct hash_platform_data *pdata)
+ {
+       struct resource res[] = {
+                       DEFINE_RES_MEM(base, SZ_4K),
+       };
+       struct platform_device_info pdevinfo = {
+                       .parent = parent,
+                       .name = "hash1",
+                       .id = id,
+                       .res = res,
+                       .num_res = ARRAY_SIZE(res),
+                       .data = pdata,
+                       .size_data = sizeof(*pdata),
+                       .dma_mask = DMA_BIT_MASK(32),
+       };
+       return platform_device_register_full(&pdevinfo);
+ }
  struct nmk_gpio_platform_data;
  
  void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num,
                      int irq, struct nmk_gpio_platform_data *pdata);
  
 +static inline void
 +dbx500_add_pinctrl(struct device *parent, const char *name)
 +{
 +      struct platform_device_info pdevinfo = {
 +              .parent = parent,
 +              .name = name,
 +              .id = -1,
 +      };
 +
 +      platform_device_register_full(&pdevinfo);
 +}
 +
  #endif
index 0b9677a95bbcab42286a64d126274000637d7db1,cdf5ca8ce588229baea7cb73481e619964f684cd..3c8010f4fb3f355f75d313bddc5ddd54fc5f6e51
@@@ -31,9 -31,10 +31,9 @@@ static inline struct amba_device 
  db8500_add_ssp(struct device *parent, const char *name, resource_size_t base,
               int irq, struct pl022_ssp_controller *pdata)
  {
 -      return dbx500_add_amba_device(parent, name, base, irq, pdata, 0);
 +      return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, pdata, 0);
  }
  
 -
  #define db8500_add_i2c0(parent, pdata) \
        dbx500_add_i2c(parent, 0, U8500_I2C0_BASE, IRQ_DB8500_I2C0, pdata)
  #define db8500_add_i2c1(parent, pdata) \
  #define db8500_add_i2c4(parent, pdata) \
        dbx500_add_i2c(parent, 4, U8500_I2C4_BASE, IRQ_DB8500_I2C4, pdata)
  
 -#define db8500_add_msp0_i2s(parent, pdata) \
 -      dbx500_add_msp_i2s(parent, 0, U8500_MSP0_BASE, IRQ_DB8500_MSP0, pdata)
 -#define db8500_add_msp1_i2s(parent, pdata) \
 -      dbx500_add_msp_i2s(parent, 1, U8500_MSP1_BASE, IRQ_DB8500_MSP1, pdata)
 -#define db8500_add_msp2_i2s(parent, pdata) \
 -      dbx500_add_msp_i2s(parent, 2, U8500_MSP2_BASE, IRQ_DB8500_MSP2, pdata)
 -#define db8500_add_msp3_i2s(parent, pdata) \
 -      dbx500_add_msp_i2s(parent, 3, U8500_MSP3_BASE, IRQ_DB8500_MSP1, pdata)
 -
  #define db8500_add_msp0_spi(parent, pdata) \
        dbx500_add_msp_spi(parent, "msp0", U8500_MSP0_BASE, \
                           IRQ_DB8500_MSP0, pdata)
        dbx500_add_uart(parent, "uart2", U8500_UART2_BASE, \
                        IRQ_DB8500_UART2, pdata)
  
+ #define db8500_add_cryp1(parent, pdata) \
+       dbx500_add_cryp1(parent, -1, U8500_CRYP1_BASE, IRQ_DB8500_CRYP1, pdata)
+ #define db8500_add_hash1(parent, pdata) \
+       dbx500_add_hash1(parent, -1, U8500_HASH1_BASE, pdata)
  #endif
index 9b5eb69a0154a664828a6744f44d7300b4895eef,a55454a5b21edd1619b68aefed55284edf280619..cbc6f1e4104ddc2c9b8c0bd7c3b96f662167f24f
  struct platform_device;
  struct amba_device;
  
 -extern struct platform_device u5500_gpio_devs[];
  extern struct platform_device u8500_gpio_devs[];
  
  extern struct amba_device ux500_pl031_device;
  
+ extern struct platform_device ux500_hash1_device;
+ extern struct platform_device ux500_cryp1_device;
  extern struct platform_device u8500_dma40_device;
  extern struct platform_device ux500_ske_keypad_device;
  
index 808c1d6601c5d3cf470d8743fd9fdc440a110067,1451f58158bfb26067f48d29358c938b00c03f69..28d16e744bfd49c11693a7c97743c1aeb5d1194d
   */
  #define U8500_IO_VIRTUAL      0xf0000000
  #define U8500_IO_PHYSICAL     0xa0000000
 +/* This is where we map in the ROM to check ASIC IDs */
 +#define UX500_VIRT_ROM                0xf0000000
  
  /* This macro is used in assembly, so no cast */
  #define IO_ADDRESS(x)           \
        (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL)
  
  /* typesafe io address */
 -#define __io_address(n)               __io(IO_ADDRESS(n))
 +#define __io_address(n)               IOMEM(IO_ADDRESS(n))
 +
  /* Used by some plat-nomadik code */
  #define io_p2v(n)             __io_address(n)
  
  #include <mach/db8500-regs.h>
 -#include <mach/db5500-regs.h>
  
  #define MSP_TX_RX_REG_OFFSET  0
+ #define CRYP1_RX_REG_OFFSET   0x10
+ #define CRYP1_TX_REG_OFFSET   0x8
+ #define HASH1_TX_REG_OFFSET   0x4
  
  #ifndef __ASSEMBLY__
  
index c225314468ee82d42abfe2a769a80d233e9087b1,8cd64f1d27977e66f34e45ea9fd1dad8a961a266..f45dad39a18bee7138f12fe8e6cb28417a77c665
@@@ -62,8 -62,8 +62,8 @@@ config HW_RANDOM_AM
  
  config HW_RANDOM_ATMEL
        tristate "Atmel Random Number Generator support"
 -      depends on HW_RANDOM && ARCH_AT91SAM9G45
 +      depends on HW_RANDOM && HAVE_CLK
-       default HW_RANDOM
+       default (HW_RANDOM && ARCH_AT91)
        ---help---
          This driver provides kernel-side support for the Random Number
          Generator hardware found on Atmel AT91 devices.
@@@ -250,16 -250,3 +250,16 @@@ config UML_RANDO
          (check your distro, or download from
          http://sourceforge.net/projects/gkernel/).  rngd periodically reads
          /dev/hwrng and injects the entropy into /dev/random.
 +
 +config HW_RANDOM_PSERIES
 +      tristate "pSeries HW Random Number Generator support"
 +      depends on HW_RANDOM && PPC64 && IBMVIO
 +      default HW_RANDOM
 +      ---help---
 +        This driver provides kernel-side support for the Random Number
 +        Generator hardware found on POWER7+ machines and above
 +
 +        To compile this driver as a module, choose M here: the
 +        module will be called pseries-rng.
 +
 +        If unsure, say Y.
diff --combined drivers/crypto/Kconfig
index 6373fa0ddb65e5c7a1ecab5d94281e3b4e17222a,69fdf18611005c395c06efcd38177491480e2495..1092a770482e53ce8597b39c9bba9dfa647db572
@@@ -111,7 -111,6 +111,7 @@@ config CRYPTO_DES_S39
        depends on S390
        select CRYPTO_ALGAPI
        select CRYPTO_BLKCIPHER
 +      select CRYPTO_DES
        help
          This is the s390 hardware accelerated implementation of the
          DES cipher algorithm (FIPS 46-2), and Triple DES EDE (FIPS 46-3).
@@@ -165,7 -164,6 +165,7 @@@ config CRYPTO_DEV_MV_CES
        select CRYPTO_ALGAPI
        select CRYPTO_AES
        select CRYPTO_BLKCIPHER2
 +      select CRYPTO_HASH
        help
          This driver allows you to utilize the Cryptographic Engines and
          Security Accelerator (CESA) which can be found on the Marvell Orion
@@@ -297,21 -295,15 +297,32 @@@ config CRYPTO_DEV_TEGRA_AE
          To compile this driver as a module, choose M here: the module
          will be called tegra-aes.
  
 +config CRYPTO_DEV_NX
 +      tristate "Support for Power7+ in-Nest cryptographic accleration"
 +      depends on PPC64 && IBMVIO
 +      select CRYPTO_AES
 +      select CRYPTO_CBC
 +      select CRYPTO_ECB
 +      select CRYPTO_CCM
 +      select CRYPTO_GCM
 +      select CRYPTO_AUTHENC
 +      select CRYPTO_XCBC
 +      select CRYPTO_SHA256
 +      select CRYPTO_SHA512
 +      help
 +        Support for Power7+ in-Nest cryptographic acceleration. This
 +        module supports acceleration for AES and SHA2 algorithms. If you
 +        choose 'M' here, this module will be called nx_crypto.
 +
+ config CRYPTO_DEV_UX500
+       tristate "Driver for ST-Ericsson UX500 crypto hardware acceleration"
+       depends on ARCH_U8500
+       select CRYPTO_ALGAPI
+       help
+         Driver for ST-Ericsson UX500 crypto engine.
+ if CRYPTO_DEV_UX500
+       source "drivers/crypto/ux500/Kconfig"
+ endif # if CRYPTO_DEV_UX500
  endif # CRYPTO_HW
This page took 0.093838 seconds and 4 git commands to generate.