aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-07-02 04:31:08 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-07-02 04:31:08 -0400
commit7a9cdd95fe153f86d23f63811ad4ba0ab32dad57 (patch)
tree4fdeea6571fbf10e59fd32cbcb9c977858791808
parentdd8164c1dd7f511aa362f548fd8c4882bee3fd54 (diff)
parentdd0120dea601de654a5a6d959da3a632a02200f0 (diff)
Merge remote-tracking branch 'agust/next' into next
From Anatolij: "There are small cleanups and fixes for mpc512x common code, mpc512x_defconfig updates and soft reboot support for mpc5125 based boards."
-rw-r--r--arch/powerpc/configs/mpc512x_defconfig27
-rw-r--r--arch/powerpc/include/asm/mpc5121.h1
-rw-r--r--arch/powerpc/platforms/512x/mpc5121_ads.c6
-rw-r--r--arch/powerpc/platforms/512x/mpc512x.h12
-rw-r--r--arch/powerpc/platforms/512x/mpc512x_generic.c4
-rw-r--r--arch/powerpc/platforms/512x/mpc512x_shared.c31
-rw-r--r--arch/powerpc/platforms/512x/pdm360ng.c4
7 files changed, 47 insertions, 38 deletions
diff --git a/arch/powerpc/configs/mpc512x_defconfig b/arch/powerpc/configs/mpc512x_defconfig
index 0d0d981442fd..ee853a1b1b2c 100644
--- a/arch/powerpc/configs/mpc512x_defconfig
+++ b/arch/powerpc/configs/mpc512x_defconfig
@@ -1,7 +1,6 @@
1CONFIG_EXPERIMENTAL=y
2# CONFIG_SWAP is not set 1# CONFIG_SWAP is not set
3CONFIG_SYSVIPC=y 2CONFIG_SYSVIPC=y
4CONFIG_SPARSE_IRQ=y 3CONFIG_NO_HZ=y
5CONFIG_LOG_BUF_SHIFT=16 4CONFIG_LOG_BUF_SHIFT=16
6CONFIG_BLK_DEV_INITRD=y 5CONFIG_BLK_DEV_INITRD=y
7# CONFIG_COMPAT_BRK is not set 6# CONFIG_COMPAT_BRK is not set
@@ -9,6 +8,7 @@ CONFIG_SLAB=y
9CONFIG_MODULES=y 8CONFIG_MODULES=y
10CONFIG_MODULE_UNLOAD=y 9CONFIG_MODULE_UNLOAD=y
11# CONFIG_BLK_DEV_BSG is not set 10# CONFIG_BLK_DEV_BSG is not set
11CONFIG_PARTITION_ADVANCED=y
12# CONFIG_IOSCHED_CFQ is not set 12# CONFIG_IOSCHED_CFQ is not set
13# CONFIG_PPC_CHRP is not set 13# CONFIG_PPC_CHRP is not set
14CONFIG_PPC_MPC512x=y 14CONFIG_PPC_MPC512x=y
@@ -16,9 +16,7 @@ CONFIG_MPC5121_ADS=y
16CONFIG_MPC512x_GENERIC=y 16CONFIG_MPC512x_GENERIC=y
17CONFIG_PDM360NG=y 17CONFIG_PDM360NG=y
18# CONFIG_PPC_PMAC is not set 18# CONFIG_PPC_PMAC is not set
19CONFIG_NO_HZ=y
20CONFIG_HZ_1000=y 19CONFIG_HZ_1000=y
21# CONFIG_MIGRATION is not set
22# CONFIG_SECCOMP is not set 20# CONFIG_SECCOMP is not set
23# CONFIG_PCI is not set 21# CONFIG_PCI is not set
24CONFIG_NET=y 22CONFIG_NET=y
@@ -33,8 +31,6 @@ CONFIG_IP_PNP=y
33# CONFIG_INET_DIAG is not set 31# CONFIG_INET_DIAG is not set
34# CONFIG_IPV6 is not set 32# CONFIG_IPV6 is not set
35CONFIG_CAN=y 33CONFIG_CAN=y
36CONFIG_CAN_RAW=y
37CONFIG_CAN_BCM=y
38CONFIG_CAN_VCAN=y 34CONFIG_CAN_VCAN=y
39CONFIG_CAN_MSCAN=y 35CONFIG_CAN_MSCAN=y
40CONFIG_CAN_DEBUG_DEVICES=y 36CONFIG_CAN_DEBUG_DEVICES=y
@@ -46,7 +42,6 @@ CONFIG_DEVTMPFS_MOUNT=y
46# CONFIG_FIRMWARE_IN_KERNEL is not set 42# CONFIG_FIRMWARE_IN_KERNEL is not set
47CONFIG_MTD=y 43CONFIG_MTD=y
48CONFIG_MTD_CMDLINE_PARTS=y 44CONFIG_MTD_CMDLINE_PARTS=y
49CONFIG_MTD_CHAR=y
50CONFIG_MTD_BLOCK=y 45CONFIG_MTD_BLOCK=y
51CONFIG_MTD_CFI=y 46CONFIG_MTD_CFI=y
52CONFIG_MTD_CFI_AMDSTD=y 47CONFIG_MTD_CFI_AMDSTD=y
@@ -60,7 +55,6 @@ CONFIG_BLK_DEV_RAM=y
60CONFIG_BLK_DEV_RAM_COUNT=1 55CONFIG_BLK_DEV_RAM_COUNT=1
61CONFIG_BLK_DEV_RAM_SIZE=8192 56CONFIG_BLK_DEV_RAM_SIZE=8192
62CONFIG_BLK_DEV_XIP=y 57CONFIG_BLK_DEV_XIP=y
63CONFIG_MISC_DEVICES=y
64CONFIG_EEPROM_AT24=y 58CONFIG_EEPROM_AT24=y
65CONFIG_EEPROM_AT25=y 59CONFIG_EEPROM_AT25=y
66CONFIG_SCSI=y 60CONFIG_SCSI=y
@@ -68,6 +62,7 @@ CONFIG_SCSI=y
68CONFIG_BLK_DEV_SD=y 62CONFIG_BLK_DEV_SD=y
69CONFIG_CHR_DEV_SG=y 63CONFIG_CHR_DEV_SG=y
70CONFIG_NETDEVICES=y 64CONFIG_NETDEVICES=y
65CONFIG_FS_ENET=y
71CONFIG_MARVELL_PHY=y 66CONFIG_MARVELL_PHY=y
72CONFIG_DAVICOM_PHY=y 67CONFIG_DAVICOM_PHY=y
73CONFIG_QSEMI_PHY=y 68CONFIG_QSEMI_PHY=y
@@ -83,10 +78,6 @@ CONFIG_STE10XP=y
83CONFIG_LSI_ET1011C_PHY=y 78CONFIG_LSI_ET1011C_PHY=y
84CONFIG_FIXED_PHY=y 79CONFIG_FIXED_PHY=y
85CONFIG_MDIO_BITBANG=y 80CONFIG_MDIO_BITBANG=y
86CONFIG_NET_ETHERNET=y
87CONFIG_FS_ENET=y
88# CONFIG_NETDEV_1000 is not set
89# CONFIG_NETDEV_10000 is not set
90# CONFIG_WLAN is not set 81# CONFIG_WLAN is not set
91# CONFIG_INPUT_MOUSEDEV_PSAUX is not set 82# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
92CONFIG_INPUT_EVDEV=y 83CONFIG_INPUT_EVDEV=y
@@ -106,14 +97,18 @@ CONFIG_GPIO_SYSFS=y
106CONFIG_GPIO_MPC8XXX=y 97CONFIG_GPIO_MPC8XXX=y
107# CONFIG_HWMON is not set 98# CONFIG_HWMON is not set
108CONFIG_MEDIA_SUPPORT=y 99CONFIG_MEDIA_SUPPORT=y
109CONFIG_VIDEO_DEV=y
110CONFIG_VIDEO_ADV_DEBUG=y 100CONFIG_VIDEO_ADV_DEBUG=y
111# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
112CONFIG_VIDEO_SAA711X=y
113CONFIG_FB=y 101CONFIG_FB=y
114CONFIG_FB_FSL_DIU=y 102CONFIG_FB_FSL_DIU=y
115# CONFIG_VGA_CONSOLE is not set 103# CONFIG_VGA_CONSOLE is not set
116CONFIG_FRAMEBUFFER_CONSOLE=y 104CONFIG_FRAMEBUFFER_CONSOLE=y
105CONFIG_USB=y
106CONFIG_USB_EHCI_HCD=y
107CONFIG_USB_EHCI_FSL=y
108# CONFIG_USB_EHCI_HCD_PPC_OF is not set
109CONFIG_USB_STORAGE=y
110CONFIG_USB_GADGET=y
111CONFIG_USB_FSL_USB2=y
117CONFIG_RTC_CLASS=y 112CONFIG_RTC_CLASS=y
118CONFIG_RTC_DRV_M41T80=y 113CONFIG_RTC_DRV_M41T80=y
119CONFIG_RTC_DRV_MPC5121=y 114CONFIG_RTC_DRV_MPC5121=y
@@ -129,9 +124,7 @@ CONFIG_TMPFS=y
129CONFIG_JFFS2_FS=y 124CONFIG_JFFS2_FS=y
130CONFIG_UBIFS_FS=y 125CONFIG_UBIFS_FS=y
131CONFIG_NFS_FS=y 126CONFIG_NFS_FS=y
132CONFIG_NFS_V3=y
133CONFIG_ROOT_NFS=y 127CONFIG_ROOT_NFS=y
134CONFIG_PARTITION_ADVANCED=y
135CONFIG_NLS_CODEPAGE_437=y 128CONFIG_NLS_CODEPAGE_437=y
136CONFIG_NLS_ISO8859_1=y 129CONFIG_NLS_ISO8859_1=y
137# CONFIG_ENABLE_WARN_DEPRECATED is not set 130# CONFIG_ENABLE_WARN_DEPRECATED is not set
diff --git a/arch/powerpc/include/asm/mpc5121.h b/arch/powerpc/include/asm/mpc5121.h
index 885c040d6194..8ae133eaf9fa 100644
--- a/arch/powerpc/include/asm/mpc5121.h
+++ b/arch/powerpc/include/asm/mpc5121.h
@@ -68,6 +68,5 @@ struct mpc512x_lpc {
68}; 68};
69 69
70int mpc512x_cs_config(unsigned int cs, u32 val); 70int mpc512x_cs_config(unsigned int cs, u32 val);
71int __init mpc5121_clk_init(void);
72 71
73#endif /* __ASM_POWERPC_MPC5121_H__ */ 72#endif /* __ASM_POWERPC_MPC5121_H__ */
diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.c b/arch/powerpc/platforms/512x/mpc5121_ads.c
index 0a134e0469ef..3e90ece10ae9 100644
--- a/arch/powerpc/platforms/512x/mpc5121_ads.c
+++ b/arch/powerpc/platforms/512x/mpc5121_ads.c
@@ -43,9 +43,7 @@ static void __init mpc5121_ads_setup_arch(void)
43 mpc83xx_add_bridge(np); 43 mpc83xx_add_bridge(np);
44#endif 44#endif
45 45
46#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) 46 mpc512x_setup_arch();
47 mpc512x_setup_diu();
48#endif
49} 47}
50 48
51static void __init mpc5121_ads_init_IRQ(void) 49static void __init mpc5121_ads_init_IRQ(void)
@@ -69,7 +67,7 @@ define_machine(mpc5121_ads) {
69 .probe = mpc5121_ads_probe, 67 .probe = mpc5121_ads_probe,
70 .setup_arch = mpc5121_ads_setup_arch, 68 .setup_arch = mpc5121_ads_setup_arch,
71 .init = mpc512x_init, 69 .init = mpc512x_init,
72 .init_early = mpc512x_init_diu, 70 .init_early = mpc512x_init_early,
73 .init_IRQ = mpc5121_ads_init_IRQ, 71 .init_IRQ = mpc5121_ads_init_IRQ,
74 .get_irq = ipic_get_irq, 72 .get_irq = ipic_get_irq,
75 .calibrate_decr = generic_calibrate_decr, 73 .calibrate_decr = generic_calibrate_decr,
diff --git a/arch/powerpc/platforms/512x/mpc512x.h b/arch/powerpc/platforms/512x/mpc512x.h
index 0a8e60023944..cc97f022d028 100644
--- a/arch/powerpc/platforms/512x/mpc512x.h
+++ b/arch/powerpc/platforms/512x/mpc512x.h
@@ -12,18 +12,12 @@
12#ifndef __MPC512X_H__ 12#ifndef __MPC512X_H__
13#define __MPC512X_H__ 13#define __MPC512X_H__
14extern void __init mpc512x_init_IRQ(void); 14extern void __init mpc512x_init_IRQ(void);
15extern void __init mpc512x_init_early(void);
15extern void __init mpc512x_init(void); 16extern void __init mpc512x_init(void);
17extern void __init mpc512x_setup_arch(void);
16extern int __init mpc5121_clk_init(void); 18extern int __init mpc5121_clk_init(void);
17void __init mpc512x_declare_of_platform_devices(void);
18extern const char *mpc512x_select_psc_compat(void); 19extern const char *mpc512x_select_psc_compat(void);
20extern const char *mpc512x_select_reset_compat(void);
19extern void mpc512x_restart(char *cmd); 21extern void mpc512x_restart(char *cmd);
20 22
21#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)
22void mpc512x_init_diu(void);
23void mpc512x_setup_diu(void);
24#else
25#define mpc512x_init_diu NULL
26#define mpc512x_setup_diu NULL
27#endif
28
29#endif /* __MPC512X_H__ */ 23#endif /* __MPC512X_H__ */
diff --git a/arch/powerpc/platforms/512x/mpc512x_generic.c b/arch/powerpc/platforms/512x/mpc512x_generic.c
index 5fb919b30924..ce71408781a0 100644
--- a/arch/powerpc/platforms/512x/mpc512x_generic.c
+++ b/arch/powerpc/platforms/512x/mpc512x_generic.c
@@ -45,8 +45,8 @@ define_machine(mpc512x_generic) {
45 .name = "MPC512x generic", 45 .name = "MPC512x generic",
46 .probe = mpc512x_generic_probe, 46 .probe = mpc512x_generic_probe,
47 .init = mpc512x_init, 47 .init = mpc512x_init,
48 .init_early = mpc512x_init_diu, 48 .init_early = mpc512x_init_early,
49 .setup_arch = mpc512x_setup_diu, 49 .setup_arch = mpc512x_setup_arch,
50 .init_IRQ = mpc512x_init_IRQ, 50 .init_IRQ = mpc512x_init_IRQ,
51 .get_irq = ipic_get_irq, 51 .get_irq = ipic_get_irq,
52 .calibrate_decr = generic_calibrate_decr, 52 .calibrate_decr = generic_calibrate_decr,
diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerpc/platforms/512x/mpc512x_shared.c
index 6eb94ab99d39..a82a41b4fd91 100644
--- a/arch/powerpc/platforms/512x/mpc512x_shared.c
+++ b/arch/powerpc/platforms/512x/mpc512x_shared.c
@@ -35,8 +35,10 @@ static struct mpc512x_reset_module __iomem *reset_module_base;
35static void __init mpc512x_restart_init(void) 35static void __init mpc512x_restart_init(void)
36{ 36{
37 struct device_node *np; 37 struct device_node *np;
38 const char *reset_compat;
38 39
39 np = of_find_compatible_node(NULL, NULL, "fsl,mpc5121-reset"); 40 reset_compat = mpc512x_select_reset_compat();
41 np = of_find_compatible_node(NULL, NULL, reset_compat);
40 if (!np) 42 if (!np)
41 return; 43 return;
42 44
@@ -58,7 +60,7 @@ void mpc512x_restart(char *cmd)
58 ; 60 ;
59} 61}
60 62
61#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) 63#if IS_ENABLED(CONFIG_FB_FSL_DIU)
62 64
63struct fsl_diu_shared_fb { 65struct fsl_diu_shared_fb {
64 u8 gamma[0x300]; /* 32-bit aligned! */ 66 u8 gamma[0x300]; /* 32-bit aligned! */
@@ -355,6 +357,17 @@ const char *mpc512x_select_psc_compat(void)
355 return NULL; 357 return NULL;
356} 358}
357 359
360const char *mpc512x_select_reset_compat(void)
361{
362 if (of_machine_is_compatible("fsl,mpc5121"))
363 return "fsl,mpc5121-reset";
364
365 if (of_machine_is_compatible("fsl,mpc5125"))
366 return "fsl,mpc5125-reset";
367
368 return NULL;
369}
370
358static unsigned int __init get_fifo_size(struct device_node *np, 371static unsigned int __init get_fifo_size(struct device_node *np,
359 char *prop_name) 372 char *prop_name)
360{ 373{
@@ -436,14 +449,26 @@ void __init mpc512x_psc_fifo_init(void)
436 } 449 }
437} 450}
438 451
452void __init mpc512x_init_early(void)
453{
454 mpc512x_restart_init();
455 if (IS_ENABLED(CONFIG_FB_FSL_DIU))
456 mpc512x_init_diu();
457}
458
439void __init mpc512x_init(void) 459void __init mpc512x_init(void)
440{ 460{
441 mpc5121_clk_init(); 461 mpc5121_clk_init();
442 mpc512x_declare_of_platform_devices(); 462 mpc512x_declare_of_platform_devices();
443 mpc512x_restart_init();
444 mpc512x_psc_fifo_init(); 463 mpc512x_psc_fifo_init();
445} 464}
446 465
466void __init mpc512x_setup_arch(void)
467{
468 if (IS_ENABLED(CONFIG_FB_FSL_DIU))
469 mpc512x_setup_diu();
470}
471
447/** 472/**
448 * mpc512x_cs_config - Setup chip select configuration 473 * mpc512x_cs_config - Setup chip select configuration
449 * @cs: chip select number 474 * @cs: chip select number
diff --git a/arch/powerpc/platforms/512x/pdm360ng.c b/arch/powerpc/platforms/512x/pdm360ng.c
index 0575e858291c..24b314d7bd5f 100644
--- a/arch/powerpc/platforms/512x/pdm360ng.c
+++ b/arch/powerpc/platforms/512x/pdm360ng.c
@@ -119,9 +119,9 @@ static int __init pdm360ng_probe(void)
119define_machine(pdm360ng) { 119define_machine(pdm360ng) {
120 .name = "PDM360NG", 120 .name = "PDM360NG",
121 .probe = pdm360ng_probe, 121 .probe = pdm360ng_probe,
122 .setup_arch = mpc512x_setup_diu, 122 .setup_arch = mpc512x_setup_arch,
123 .init = pdm360ng_init, 123 .init = pdm360ng_init,
124 .init_early = mpc512x_init_diu, 124 .init_early = mpc512x_init_early,
125 .init_IRQ = mpc512x_init_IRQ, 125 .init_IRQ = mpc512x_init_IRQ,
126 .get_irq = ipic_get_irq, 126 .get_irq = ipic_get_irq,
127 .calibrate_decr = generic_calibrate_decr, 127 .calibrate_decr = generic_calibrate_decr,