Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292546
b: refs/heads/master
c: 2d87e06
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Herrenschmidt committed Mar 20, 2012
1 parent 4fbce6f commit 1283350
Show file tree
Hide file tree
Showing 6 changed files with 193 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b5594a7760fa048730db64c501cf4534df06b3b3
refs/heads/master: 2d87e06e7477fa1467e730087b68c2f518c0fff6
12 changes: 6 additions & 6 deletions trunk/Documentation/powerpc/mpc52xx.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@ Linux 2.6.x on MPC52xx family
-----------------------------

For the latest info, go to http://www.246tNt.com/mpc52xx/

To compile/use :

- U-Boot:
# <edit Makefile to set ARCH=ppc & CROSS_COMPILE=... ( also EXTRAVERSION
if you wish to ).
# make lite5200_defconfig
# make uImage

then, on U-boot:
=> tftpboot 200000 uImage
=> tftpboot 400000 pRamdisk
=> bootm 200000 400000

- DBug:
# <edit Makefile to set ARCH=ppc & CROSS_COMPILE=... ( also EXTRAVERSION
if you wish to ).
# make lite5200_defconfig
# cp your_initrd.gz arch/ppc/boot/images/ramdisk.image.gz
# make zImage.initrd
# make
# make zImage.initrd
# make

then in DBug:
DBug> dn -i zImage.initrd.lite5200


Some remarks :
- The port is named mpc52xxx, and config options are PPC_MPC52xx. The MGT5100
Expand Down
168 changes: 168 additions & 0 deletions trunk/arch/powerpc/boot/dts/a4m072.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
/*
* a4m072 board Device Tree Source
*
* Copyright (C) 2011 DENX Software Engineering GmbH
* Heiko Schocher <hs@denx.de>
*
* Copyright (C) 2007 Semihalf
* Marian Balakowicz <m8@semihalf.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/

/include/ "mpc5200b.dtsi"

/ {
model = "anonymous,a4m072";
compatible = "anonymous,a4m072";

soc5200@f0000000 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "fsl,mpc5200b-immr";
ranges = <0 0xf0000000 0x0000c000>;
reg = <0xf0000000 0x00000100>;
bus-frequency = <0>; /* From boot loader */
system-frequency = <0>; /* From boot loader */

cdm@200 {
fsl,init-ext-48mhz-en = <0x0>;
fsl,init-fd-enable = <0x01>;
fsl,init-fd-counters = <0x3333>;
};

timer@600 {
fsl,has-wdt;
};

gpt3: timer@630 { /* General Purpose Timer in GPIO mode */
compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
gpio-controller;
#gpio-cells = <2>;
};

gpt4: timer@640 { /* General Purpose Timer in GPIO mode */
compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
gpio-controller;
#gpio-cells = <2>;
};

gpt5: timer@650 { /* General Purpose Timer in GPIO mode */
compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
gpio-controller;
#gpio-cells = <2>;
};

spi@f00 {
status = "disabled";
};

psc@2000 {
compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
reg = <0x2000 0x100>;
interrupts = <2 1 0>;
};

psc@2200 {
compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
reg = <0x2200 0x100>;
interrupts = <2 2 0>;
};

psc@2400 {
compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
reg = <0x2400 0x100>;
interrupts = <2 3 0>;
};

psc@2600 {
status = "disabled";
};

psc@2800 {
status = "disabled";
};

psc@2c00 {
compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
reg = <0x2c00 0x100>;
interrupts = <2 4 0>;
};

ethernet@3000 {
phy-handle = <&phy0>;
};

mdio@3000 {
phy0: ethernet-phy@1f {
reg = <0x1f>;
interrupts = <1 2 0>; /* IRQ 2 active low */
};
};

i2c@3d00 {
status = "disabled";
};

i2c@3d40 {
hwmon@2e {
compatible = "nsc,lm87";
reg = <0x2e>;
};
rtc@51 {
compatible = "nxp,rtc8564";
reg = <0x51>;
};
};
};

localbus {
compatible = "fsl,mpc5200b-lpb","simple-bus";
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0xfe000000 0x02000000
1 0 0x62000000 0x00400000
2 0 0x64000000 0x00200000
3 0 0x66000000 0x01000000
6 0 0x68000000 0x01000000
7 0 0x6a000000 0x00000004>;

flash@0,0 {
compatible = "cfi-flash";
reg = <0 0 0x02000000>;
bank-width = <2>;
#size-cells = <1>;
#address-cells = <1>;
};
sram0@1,0 {
compatible = "mtd-ram";
reg = <1 0x00000 0x00400000>;
bank-width = <2>;
};
};

pci@f0000d00 {
#interrupt-cells = <1>;
#size-cells = <2>;
#address-cells = <3>;
device_type = "pci";
compatible = "fsl,mpc5200-pci";
reg = <0xf0000d00 0x100>;
interrupt-map-mask = <0xf800 0 0 7>;
interrupt-map = <
/* IDSEL 0x16 */
0xc000 0 0 1 &mpc5200_pic 1 3 3
0xc000 0 0 2 &mpc5200_pic 1 3 3
0xc000 0 0 3 &mpc5200_pic 1 3 3
0xc000 0 0 4 &mpc5200_pic 1 3 3>;
clock-frequency = <0>; /* From boot loader */
interrupts = <2 8 0 2 9 0 2 10 0>;
bus-range = <0 0>;
ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000
0x02000000 0 0x90000000 0x90000000 0 0x10000000
0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
};
};
27 changes: 13 additions & 14 deletions trunk/arch/powerpc/configs/mpc5200_defconfig
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
CONFIG_EXPERIMENTAL=y
CONFIG_SYSVIPC=y
CONFIG_SPARSE_IRQ=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_BLK_DEV_INITRD=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set
Expand All @@ -13,15 +13,12 @@ CONFIG_PPC_EFIKA=y
CONFIG_PPC_LITE5200=y
CONFIG_PPC_MEDIA5200=y
CONFIG_PPC_MPC5200_BUGFIX=y
CONFIG_PPC_MPC5200_GPIO=y
CONFIG_PPC_MPC5200_LPBFIFO=m
# CONFIG_PPC_PMAC is not set
CONFIG_PPC_BESTCOMM=y
CONFIG_SIMPLE_GPIO=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_SPARSE_IRQ=y
CONFIG_PM=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
Expand All @@ -36,23 +33,20 @@ CONFIG_SYN_COOKIES=y
# CONFIG_IPV6 is not set
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_MTD=y
CONFIG_MTD_CONCAT=y
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_OF_PARTS=y
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_CFI=y
CONFIG_MTD_CFI_AMDSTD=y
CONFIG_MTD_RAM=y
CONFIG_MTD_ROM=y
CONFIG_MTD_PHYSMAP_OF=y
CONFIG_MTD_PLATRAM=y
CONFIG_MTD_UBI=m
CONFIG_PROC_DEVICETREE=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=32768
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_AT24=y
CONFIG_SCSI_TGT=y
CONFIG_BLK_DEV_SD=y
Expand All @@ -61,11 +55,10 @@ CONFIG_ATA=y
CONFIG_PATA_MPC52xx=y
CONFIG_PATA_PLATFORM=y
CONFIG_NETDEVICES=y
CONFIG_LXT_PHY=y
CONFIG_NET_ETHERNET=y
CONFIG_FEC_MPC52xx=y
# CONFIG_NETDEV_1000 is not set
# CONFIG_NETDEV_10000 is not set
CONFIG_AMD_PHY=y
CONFIG_LXT_PHY=y
CONFIG_FIXED_PHY=y
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_SERIO is not set
Expand All @@ -80,11 +73,17 @@ CONFIG_SPI_GPIO=m
CONFIG_SPI_MPC52xx=m
CONFIG_SPI_MPC52xx_PSC=m
CONFIG_SPI_SPIDEV=m
CONFIG_GPIO_SYSFS=y
CONFIG_SENSORS_LM80=y
CONFIG_SENSORS_LM87=m
CONFIG_WATCHDOG=y
CONFIG_MFD_SM501=m
CONFIG_DRM=y
CONFIG_VIDEO_OUTPUT_CONTROL=y
CONFIG_FB=y
CONFIG_FB_FOREIGN_ENDIAN=y
CONFIG_FB_RADEON=y
CONFIG_FB_SM501=m
# CONFIG_VGA_CONSOLE is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_LOGO=y
Expand Down Expand Up @@ -124,10 +123,11 @@ CONFIG_USB_STORAGE=y
CONFIG_NEW_LEDS=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_DS1307=y
CONFIG_RTC_DRV_DS1374=y
CONFIG_RTC_DRV_PCF8563=m
CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y
# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
CONFIG_INOTIFY=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_PROC_KCORE=y
Expand All @@ -145,5 +145,4 @@ CONFIG_PRINTK_TIME=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DETECT_HUNG_TASK=y
CONFIG_DEBUG_INFO=y
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
# CONFIG_CRYPTO_ANSI_CPRNG is not set
1 change: 1 addition & 0 deletions trunk/arch/powerpc/platforms/52xx/mpc5200_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ static void __init mpc5200_simple_setup_arch(void)

/* list of the supported boards */
static const char *board[] __initdata = {
"anonymous,a4m072",
"anon,charon",
"intercontrol,digsy-mtc",
"manroland,mucmc52",
Expand Down
10 changes: 4 additions & 6 deletions trunk/arch/powerpc/platforms/52xx/mpc52xx_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,11 @@ struct mpc52xx_gpio_wkup __iomem *wkup_gpio;
* of the localplus bus to the of_platform
* bus.
*/
void __init
mpc52xx_declare_of_platform_devices(void)
void __init mpc52xx_declare_of_platform_devices(void)
{
/* Find every child of the SOC node and add it to of_platform */
if (of_platform_bus_probe(NULL, mpc52xx_bus_ids, NULL))
printk(KERN_ERR __FILE__ ": "
"Error while probing of_platform bus\n");
/* Find all the 'platform' devices and register them. */
if (of_platform_populate(NULL, mpc52xx_bus_ids, NULL, NULL))
pr_err(__FILE__ ": Error while populating devices from DT\n");
}

/*
Expand Down

0 comments on commit 1283350

Please sign in to comment.