Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[platform/adaptation/renesas_rcar/renesas_kernel.git] / arch / arm / mach-pxa / palmtreo.c
index a29849d..d82a50b 100644 (file)
@@ -167,7 +167,7 @@ static unsigned long centro685_pin_config[] __initdata = {
 /******************************************************************************
  * GPIO keyboard
  ******************************************************************************/
-#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
+#if IS_ENABLED(CONFIG_KEYBOARD_PXA27x)
 static unsigned int treo680_matrix_keys[] = {
        KEY(0, 0, KEY_F8),              /* Red/Off/Power */
        KEY(0, 1, KEY_LEFT),
@@ -315,7 +315,7 @@ static inline void palmtreo_kpc_init(void) {}
 /******************************************************************************
  * USB host
  ******************************************************************************/
-#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
+#if IS_ENABLED(CONFIG_USB_OHCI_HCD)
 static struct pxaohci_platform_data treo680_ohci_info = {
        .port_mode    = PMM_PERPORT_MODE,
        .flags        = ENABLE_PORT1 | ENABLE_PORT3,
@@ -397,6 +397,36 @@ static void __init palmtreo_leds_init(void)
 }
 
 /******************************************************************************
+ * diskonchip docg4 flash
+ ******************************************************************************/
+#if defined(CONFIG_MACH_TREO680)
+/* REVISIT: does the centro have this device also? */
+#if IS_ENABLED(CONFIG_MTD_NAND_DOCG4)
+static struct resource docg4_resources[] = {
+       {
+               .start  = 0x00000000,
+               .end    = 0x00001FFF,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device treo680_docg4_flash = {
+       .name   = "docg4",
+       .id     = -1,
+       .resource = docg4_resources,
+       .num_resources = ARRAY_SIZE(docg4_resources),
+};
+
+static void __init treo680_docg4_flash_init(void)
+{
+       platform_device_register(&treo680_docg4_flash);
+}
+#else
+static inline void treo680_docg4_flash_init(void) {}
+#endif
+#endif
+
+/******************************************************************************
  * Machine init
  ******************************************************************************/
 static void __init treo_reserve(void)
@@ -480,6 +510,7 @@ static void __init treo680_init(void)
        treo680_gpio_init();
        palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, GPIO_NR_TREO680_SD_READONLY,
                        GPIO_NR_TREO680_SD_POWER, 0);
+       treo680_docg4_flash_init();
 }
 #endif