|
@@ -196,3 +196,65 @@ static struct mmci_platform_data mmcsd_plat_data = {
|
|
|
.f_max = 48000000,
|
|
|
.gpio_wp = -1,
|
|
|
.gpio_cd = 111,
|
|
|
+ .cd_invert = true,
|
|
|
+ .capabilities = MMC_CAP_MMC_HIGHSPEED |
|
|
|
+ MMC_CAP_SD_HIGHSPEED | MMC_CAP_4_BIT_DATA,
|
|
|
+};
|
|
|
+
|
|
|
+static int __init nhk8815_mmcsd_init(void)
|
|
|
+{
|
|
|
+ int ret;
|
|
|
+
|
|
|
+ ret = gpio_request(112, "card detect bias");
|
|
|
+ if (ret)
|
|
|
+ return ret;
|
|
|
+ gpio_direction_output(112, 0);
|
|
|
+ amba_apb_device_add(NULL, "mmci", NOMADIK_SDI_BASE, SZ_4K, IRQ_SDMMC, 0, &mmcsd_plat_data, 0x10180180);
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+module_init(nhk8815_mmcsd_init);
|
|
|
+
|
|
|
+static struct resource nhk8815_eth_resources[] = {
|
|
|
+ {
|
|
|
+ .name = "smc91x-regs",
|
|
|
+ .start = 0x34000000 + 0x300,
|
|
|
+ .end = 0x34000000 + SZ_64K - 1,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ }, {
|
|
|
+ .start = NOMADIK_GPIO_TO_IRQ(115),
|
|
|
+ .end = NOMADIK_GPIO_TO_IRQ(115),
|
|
|
+ .flags = IORESOURCE_IRQ | IRQF_TRIGGER_RISING,
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device nhk8815_eth_device = {
|
|
|
+ .name = "smc91x",
|
|
|
+ .resource = nhk8815_eth_resources,
|
|
|
+ .num_resources = ARRAY_SIZE(nhk8815_eth_resources),
|
|
|
+};
|
|
|
+
|
|
|
+static int __init nhk8815_eth_init(void)
|
|
|
+{
|
|
|
+ int gpio_nr = 115; /* hardwired in the board */
|
|
|
+ int err;
|
|
|
+
|
|
|
+ err = gpio_request(gpio_nr, "eth_irq");
|
|
|
+ if (!err) err = nmk_gpio_set_mode(gpio_nr, NMK_GPIO_ALT_GPIO);
|
|
|
+ if (!err) err = gpio_direction_input(gpio_nr);
|
|
|
+ if (err)
|
|
|
+ pr_err("Error %i in %s\n", err, __func__);
|
|
|
+ return err;
|
|
|
+}
|
|
|
+device_initcall(nhk8815_eth_init);
|
|
|
+
|
|
|
+static struct platform_device *nhk8815_platform_devices[] __initdata = {
|
|
|
+ &nhk8815_nand_device,
|
|
|
+ &nhk8815_onenand_device,
|
|
|
+ &nhk8815_eth_device,
|
|
|
+ /* will add more devices */
|
|
|
+};
|
|
|
+
|
|
|
+static void __init nomadik_timer_init(void)
|
|
|
+{
|
|
|
+ u32 src_cr;
|
|
|
+
|