Skip to content

Commit 7a9cdd9

Browse files
committed
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."
2 parents dd8164c + dd0120d commit 7a9cdd9

File tree

7 files changed

+47
-38
lines changed

7 files changed

+47
-38
lines changed

arch/powerpc/configs/mpc512x_defconfig

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
1-
CONFIG_EXPERIMENTAL=y
21
# CONFIG_SWAP is not set
32
CONFIG_SYSVIPC=y
4-
CONFIG_SPARSE_IRQ=y
3+
CONFIG_NO_HZ=y
54
CONFIG_LOG_BUF_SHIFT=16
65
CONFIG_BLK_DEV_INITRD=y
76
# CONFIG_COMPAT_BRK is not set
87
CONFIG_SLAB=y
98
CONFIG_MODULES=y
109
CONFIG_MODULE_UNLOAD=y
1110
# CONFIG_BLK_DEV_BSG is not set
11+
CONFIG_PARTITION_ADVANCED=y
1212
# CONFIG_IOSCHED_CFQ is not set
1313
# CONFIG_PPC_CHRP is not set
1414
CONFIG_PPC_MPC512x=y
1515
CONFIG_MPC5121_ADS=y
1616
CONFIG_MPC512x_GENERIC=y
1717
CONFIG_PDM360NG=y
1818
# CONFIG_PPC_PMAC is not set
19-
CONFIG_NO_HZ=y
2019
CONFIG_HZ_1000=y
21-
# CONFIG_MIGRATION is not set
2220
# CONFIG_SECCOMP is not set
2321
# CONFIG_PCI is not set
2422
CONFIG_NET=y
@@ -33,8 +31,6 @@ CONFIG_IP_PNP=y
3331
# CONFIG_INET_DIAG is not set
3432
# CONFIG_IPV6 is not set
3533
CONFIG_CAN=y
36-
CONFIG_CAN_RAW=y
37-
CONFIG_CAN_BCM=y
3834
CONFIG_CAN_VCAN=y
3935
CONFIG_CAN_MSCAN=y
4036
CONFIG_CAN_DEBUG_DEVICES=y
@@ -46,7 +42,6 @@ CONFIG_DEVTMPFS_MOUNT=y
4642
# CONFIG_FIRMWARE_IN_KERNEL is not set
4743
CONFIG_MTD=y
4844
CONFIG_MTD_CMDLINE_PARTS=y
49-
CONFIG_MTD_CHAR=y
5045
CONFIG_MTD_BLOCK=y
5146
CONFIG_MTD_CFI=y
5247
CONFIG_MTD_CFI_AMDSTD=y
@@ -60,14 +55,14 @@ CONFIG_BLK_DEV_RAM=y
6055
CONFIG_BLK_DEV_RAM_COUNT=1
6156
CONFIG_BLK_DEV_RAM_SIZE=8192
6257
CONFIG_BLK_DEV_XIP=y
63-
CONFIG_MISC_DEVICES=y
6458
CONFIG_EEPROM_AT24=y
6559
CONFIG_EEPROM_AT25=y
6660
CONFIG_SCSI=y
6761
# CONFIG_SCSI_PROC_FS is not set
6862
CONFIG_BLK_DEV_SD=y
6963
CONFIG_CHR_DEV_SG=y
7064
CONFIG_NETDEVICES=y
65+
CONFIG_FS_ENET=y
7166
CONFIG_MARVELL_PHY=y
7267
CONFIG_DAVICOM_PHY=y
7368
CONFIG_QSEMI_PHY=y
@@ -83,10 +78,6 @@ CONFIG_STE10XP=y
8378
CONFIG_LSI_ET1011C_PHY=y
8479
CONFIG_FIXED_PHY=y
8580
CONFIG_MDIO_BITBANG=y
86-
CONFIG_NET_ETHERNET=y
87-
CONFIG_FS_ENET=y
88-
# CONFIG_NETDEV_1000 is not set
89-
# CONFIG_NETDEV_10000 is not set
9081
# CONFIG_WLAN is not set
9182
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
9283
CONFIG_INPUT_EVDEV=y
@@ -106,14 +97,18 @@ CONFIG_GPIO_SYSFS=y
10697
CONFIG_GPIO_MPC8XXX=y
10798
# CONFIG_HWMON is not set
10899
CONFIG_MEDIA_SUPPORT=y
109-
CONFIG_VIDEO_DEV=y
110100
CONFIG_VIDEO_ADV_DEBUG=y
111-
# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
112-
CONFIG_VIDEO_SAA711X=y
113101
CONFIG_FB=y
114102
CONFIG_FB_FSL_DIU=y
115103
# CONFIG_VGA_CONSOLE is not set
116104
CONFIG_FRAMEBUFFER_CONSOLE=y
105+
CONFIG_USB=y
106+
CONFIG_USB_EHCI_HCD=y
107+
CONFIG_USB_EHCI_FSL=y
108+
# CONFIG_USB_EHCI_HCD_PPC_OF is not set
109+
CONFIG_USB_STORAGE=y
110+
CONFIG_USB_GADGET=y
111+
CONFIG_USB_FSL_USB2=y
117112
CONFIG_RTC_CLASS=y
118113
CONFIG_RTC_DRV_M41T80=y
119114
CONFIG_RTC_DRV_MPC5121=y
@@ -129,9 +124,7 @@ CONFIG_TMPFS=y
129124
CONFIG_JFFS2_FS=y
130125
CONFIG_UBIFS_FS=y
131126
CONFIG_NFS_FS=y
132-
CONFIG_NFS_V3=y
133127
CONFIG_ROOT_NFS=y
134-
CONFIG_PARTITION_ADVANCED=y
135128
CONFIG_NLS_CODEPAGE_437=y
136129
CONFIG_NLS_ISO8859_1=y
137130
# CONFIG_ENABLE_WARN_DEPRECATED is not set

arch/powerpc/include/asm/mpc5121.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,5 @@ struct mpc512x_lpc {
6868
};
6969

7070
int mpc512x_cs_config(unsigned int cs, u32 val);
71-
int __init mpc5121_clk_init(void);
7271

7372
#endif /* __ASM_POWERPC_MPC5121_H__ */

arch/powerpc/platforms/512x/mpc5121_ads.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ static void __init mpc5121_ads_setup_arch(void)
4343
mpc83xx_add_bridge(np);
4444
#endif
4545

46-
#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)
47-
mpc512x_setup_diu();
48-
#endif
46+
mpc512x_setup_arch();
4947
}
5048

5149
static void __init mpc5121_ads_init_IRQ(void)
@@ -69,7 +67,7 @@ define_machine(mpc5121_ads) {
6967
.probe = mpc5121_ads_probe,
7068
.setup_arch = mpc5121_ads_setup_arch,
7169
.init = mpc512x_init,
72-
.init_early = mpc512x_init_diu,
70+
.init_early = mpc512x_init_early,
7371
.init_IRQ = mpc5121_ads_init_IRQ,
7472
.get_irq = ipic_get_irq,
7573
.calibrate_decr = generic_calibrate_decr,

arch/powerpc/platforms/512x/mpc512x.h

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,12 @@
1212
#ifndef __MPC512X_H__
1313
#define __MPC512X_H__
1414
extern void __init mpc512x_init_IRQ(void);
15+
extern void __init mpc512x_init_early(void);
1516
extern void __init mpc512x_init(void);
17+
extern void __init mpc512x_setup_arch(void);
1618
extern int __init mpc5121_clk_init(void);
17-
void __init mpc512x_declare_of_platform_devices(void);
1819
extern const char *mpc512x_select_psc_compat(void);
20+
extern const char *mpc512x_select_reset_compat(void);
1921
extern void mpc512x_restart(char *cmd);
2022

21-
#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)
22-
void mpc512x_init_diu(void);
23-
void mpc512x_setup_diu(void);
24-
#else
25-
#define mpc512x_init_diu NULL
26-
#define mpc512x_setup_diu NULL
27-
#endif
28-
2923
#endif /* __MPC512X_H__ */

arch/powerpc/platforms/512x/mpc512x_generic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ define_machine(mpc512x_generic) {
4545
.name = "MPC512x generic",
4646
.probe = mpc512x_generic_probe,
4747
.init = mpc512x_init,
48-
.init_early = mpc512x_init_diu,
49-
.setup_arch = mpc512x_setup_diu,
48+
.init_early = mpc512x_init_early,
49+
.setup_arch = mpc512x_setup_arch,
5050
.init_IRQ = mpc512x_init_IRQ,
5151
.get_irq = ipic_get_irq,
5252
.calibrate_decr = generic_calibrate_decr,

arch/powerpc/platforms/512x/mpc512x_shared.c

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ static struct mpc512x_reset_module __iomem *reset_module_base;
3535
static void __init mpc512x_restart_init(void)
3636
{
3737
struct device_node *np;
38+
const char *reset_compat;
3839

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);
4042
if (!np)
4143
return;
4244

@@ -58,7 +60,7 @@ void mpc512x_restart(char *cmd)
5860
;
5961
}
6062

61-
#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)
63+
#if IS_ENABLED(CONFIG_FB_FSL_DIU)
6264

6365
struct fsl_diu_shared_fb {
6466
u8 gamma[0x300]; /* 32-bit aligned! */
@@ -355,6 +357,17 @@ const char *mpc512x_select_psc_compat(void)
355357
return NULL;
356358
}
357359

360+
const 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+
358371
static unsigned int __init get_fifo_size(struct device_node *np,
359372
char *prop_name)
360373
{
@@ -436,14 +449,26 @@ void __init mpc512x_psc_fifo_init(void)
436449
}
437450
}
438451

452+
void __init mpc512x_init_early(void)
453+
{
454+
mpc512x_restart_init();
455+
if (IS_ENABLED(CONFIG_FB_FSL_DIU))
456+
mpc512x_init_diu();
457+
}
458+
439459
void __init mpc512x_init(void)
440460
{
441461
mpc5121_clk_init();
442462
mpc512x_declare_of_platform_devices();
443-
mpc512x_restart_init();
444463
mpc512x_psc_fifo_init();
445464
}
446465

466+
void __init mpc512x_setup_arch(void)
467+
{
468+
if (IS_ENABLED(CONFIG_FB_FSL_DIU))
469+
mpc512x_setup_diu();
470+
}
471+
447472
/**
448473
* mpc512x_cs_config - Setup chip select configuration
449474
* @cs: chip select number

arch/powerpc/platforms/512x/pdm360ng.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ static int __init pdm360ng_probe(void)
119119
define_machine(pdm360ng) {
120120
.name = "PDM360NG",
121121
.probe = pdm360ng_probe,
122-
.setup_arch = mpc512x_setup_diu,
122+
.setup_arch = mpc512x_setup_arch,
123123
.init = pdm360ng_init,
124-
.init_early = mpc512x_init_diu,
124+
.init_early = mpc512x_init_early,
125125
.init_IRQ = mpc512x_init_IRQ,
126126
.get_irq = ipic_get_irq,
127127
.calibrate_decr = generic_calibrate_decr,

0 commit comments

Comments
 (0)