Re: [PATCH v2 2/2] 82xx, mgcoge: update defconfig for 2.6.32

2009-08-06 Thread Heiko Schocher
Hello Kumar,

Kumar Gala wrote:
> On Aug 3, 2009, at 2:35 AM, Heiko Schocher wrote:
> 
>> - add I2C support
>> - add FCC1 and FCC2 support
>>
>> Signed-off-by: Heiko Schocher 
>> ---
>> - against git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
>>  next branch
>> - checked with checkpatch.pl:
>> $ ./scripts/checkpatch.pl
>> 0002-82xx-mgcoge-update-defconfig-for-2.6.32.patch
>> total: 0 errors, 0 warnings, 381 lines checked
> 
> I had problems applying this to my 'next' branch

Ups, Sorry, I based this patchset against:
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
  

I make a patch against your next branch ...

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH v2 2/2] 82xx, mgcoge: update defconfig for 2.6.32

2009-08-03 Thread Heiko Schocher
- add I2C support
- add FCC1 and FCC2 support

Signed-off-by: Heiko Schocher 
---
- against git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
  next branch
- checked with checkpatch.pl:
$ ./scripts/checkpatch.pl 0002-82xx-mgcoge-update-defconfig-for-2.6.32.patch
total: 0 errors, 0 warnings, 381 lines checked

0002-82xx-mgcoge-update-defconfig-for-2.6.32.patch has no obvious style 
problems and is ready for submission.
$
- changes since v1
  - Add comments from David Gibson
removed 2 "device_type" entries
  - Add comment from Kumar Gala
splittet into 2 patches (seperated defconfig patch)

 arch/powerpc/configs/mgcoge_defconfig |  178 +---
 1 files changed, 139 insertions(+), 39 deletions(-)

diff --git a/arch/powerpc/configs/mgcoge_defconfig 
b/arch/powerpc/configs/mgcoge_defconfig
index 31e1df6..a6fe6b0 100644
--- a/arch/powerpc/configs/mgcoge_defconfig
+++ b/arch/powerpc/configs/mgcoge_defconfig
@@ -1,25 +1,27 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.30-rc3
-# Wed May 13 17:21:55 2009
+# Linux kernel version: 2.6.31-rc4
+# Wed Jul 29 08:57:10 2009
 #
 # CONFIG_PPC64 is not set

 #
 # Processor support
 #
-CONFIG_6xx=y
+CONFIG_PPC_BOOK3S_32=y
 # CONFIG_PPC_85xx is not set
 # CONFIG_PPC_8xx is not set
 # CONFIG_40x is not set
 # CONFIG_44x is not set
 # CONFIG_E200 is not set
 CONFIG_PPC_BOOK3S=y
+CONFIG_6xx=y
 CONFIG_PPC_FPU=y
 # CONFIG_ALTIVEC is not set
 CONFIG_PPC_STD_MMU=y
 CONFIG_PPC_STD_MMU_32=y
 # CONFIG_PPC_MM_SLICES is not set
+CONFIG_PPC_HAVE_PMU_SUPPORT=y
 # CONFIG_SMP is not set
 CONFIG_PPC32=y
 CONFIG_WORD_SIZE=32
@@ -30,15 +32,16 @@ CONFIG_GENERIC_TIME=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
 # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
 CONFIG_IRQ_PER_CPU=y
 CONFIG_STACKTRACE_SUPPORT=y
 CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_ARCH_HAS_ILOG2_U32=y
 CONFIG_GENERIC_HWEIGHT=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_GPIO=y
 # CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -53,6 +56,7 @@ CONFIG_PPC_UDBG_16550=y
 # CONFIG_GENERIC_TBSYNC is not set
 CONFIG_AUDIT_ARCH=y
 CONFIG_GENERIC_BUG=y
+CONFIG_DTC=y
 # CONFIG_DEFAULT_UIMAGE is not set
 CONFIG_HIBERNATE_32=y
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
@@ -60,6 +64,7 @@ CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 # CONFIG_PPC_DCR_MMIO is not set
 CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+CONFIG_CONSTRUCTORS=y

 #
 # General setup
@@ -105,7 +110,6 @@ CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
-# CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
@@ -119,8 +123,15 @@ CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
 CONFIG_AIO=y
+CONFIG_HAVE_PERF_COUNTERS=y
+
+#
+# Performance Counters
+#
+# CONFIG_PERF_COUNTERS is not set
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_PCI_QUIRKS=y
+# CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_COMPAT_BRK=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
@@ -134,6 +145,11 @@ CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
 CONFIG_HAVE_ARCH_TRACEHOOK=y
 CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_GCOV_KERNEL is not set
 # CONFIG_SLOW_WORK is not set
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
@@ -141,7 +157,7 @@ CONFIG_RT_MUTEXES=y
 CONFIG_BASE_SMALL=0
 # CONFIG_MODULES is not set
 CONFIG_BLOCK=y
-# CONFIG_LBD is not set
+CONFIG_LBDAF=y
 # CONFIG_BLK_DEV_INTEGRITY is not set

 #
@@ -225,6 +241,7 @@ CONFIG_BINFMT_ELF=y
 # CONFIG_HAVE_AOUT is not set
 CONFIG_BINFMT_MISC=y
 # CONFIG_IOMMU_HELPER is not set
+# CONFIG_SWIOTLB is not set
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_ARCH_HAS_WALK_MEMORY=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -240,9 +257,9 @@ CONFIG_MIGRATION=y
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
-CONFIG_UNEVICTABLE_LRU=y
 CONFIG_HAVE_MLOCK=y
 CONFIG_HAVE_MLOCKED_PAGE_BIT=y
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
 CONFIG_PPC_4K_PAGES=y
 # CONFIG_PPC_16K_PAGES is not set
 # CONFIG_PPC_64K_PAGES is not set
@@ -313,6 +330,7 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
 # CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
 CONFIG_SYN_COOKIES=y
 # CONFIG_INET_AH is not set
 # CONFIG_INET_ESP is not set
@@ -374,7 +392,11 @@ CONFIG_WIRELESS=y
 CONFIG_WIRELESS_OLD_REGULATORY=y
 # CONFIG_WIRELESS_EXT is not set
 # CONFIG_LIB80211 is not set
-# CONFIG_MAC80211 is not set
+
+#
+# CFG80211 needs to be enabled for MAC80211
+#
+CONFIG_MAC80211_DEFAULT_PS_VALUE=0
 # CONFIG_WIMAX is not set
 # CONFIG_RFKILL is not set

@@ -484,6 +506,8 @@ CONFIG_MTD_PHYSMAP_OF=y
 # CONFIG_MTD_UBI is not set
 CONFIG_OF_DEVICE=y
 CONFIG_OF_GPIO=y
+CONFIG_OF_I2C=y
+CONFIG_OF_MD

[PATCH v2 1/2] 82xx, mgcoge: updates for 2.6.32

2009-08-03 Thread Heiko Schocher
[PATCH v2 1/2] 82xx, mgcoge: updates for 2.6.32

- add I2C support
- add FCC1 and FCC2 support
- fix bogus gpio numbering in plattformcode

Signed-off-by: Heiko Schocher 
---
- against git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
  next branch
- checked with checkpatch.pl:
$ ./scripts/checkpatch.pl 0001-82xx-mgcoge-updates-for-2.6.32.patch
total: 0 errors, 0 warnings, 147 lines checked

0001-82xx-mgcoge-updates-for-2.6.32.patch has no obvious style problems and is 
ready for submission.
$
- changes since v1
  - Add comments from David Gibson
removed 2 "device_type" entries
  - Add comment from Kumar Gala
splittet into 2 patches (seperated defconfig patch)

 arch/powerpc/boot/dts/mgcoge.dts |   53 ++
 arch/powerpc/platforms/82xx/mgcoge.c |   69 +
 2 files changed, 113 insertions(+), 9 deletions(-)

diff --git a/arch/powerpc/boot/dts/mgcoge.dts b/arch/powerpc/boot/dts/mgcoge.dts
index 633255a..0ce9664 100644
--- a/arch/powerpc/boot/dts/mgcoge.dts
+++ b/arch/powerpc/boot/dts/mgcoge.dts
@@ -162,6 +162,59 @@
fixed-link = <0 0 10 0 0>;
};

+   i...@11860 {
+   compatible = "fsl,mpc8272-i2c",
+"fsl,cpm2-i2c";
+   reg = <0x11860 0x20 0x8afc 0x2>;
+   interrupts = <1 8>;
+   interrupt-parent = <&PIC>;
+   fsl,cpm-command = <0x2960>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   };
+
+   m...@10d40 {
+   compatible = "fsl,cpm2-mdio-bitbang";
+   reg = <0x10d00 0x14>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   fsl,mdio-pin = <12>;
+   fsl,mdc-pin = <13>;
+
+   phy0: ethernet-...@0 {
+   reg = <0x0>;
+   };
+
+   phy1: ethernet-...@1 {
+   reg = <0x1>;
+   };
+   };
+
+   /* FCC1 management to switch */
+   ether...@11300 {
+   device_type = "network";
+   compatible = "fsl,cpm2-fcc-enet";
+   reg = <0x11300 0x20 0x8400 0x100 0x11390 0x1>;
+   local-mac-address = [ 00 01 02 03 04 07 ];
+   interrupts = <32 8>;
+   interrupt-parent = <&PIC>;
+   phy-handle = <&phy0>;
+   linux,network-index = <1>;
+   fsl,cpm-command = <0x12000300>;
+   };
+
+   /* FCC2 to redundant core unit over backplane */
+   ether...@11320 {
+   device_type = "network";
+   compatible = "fsl,cpm2-fcc-enet";
+   reg = <0x11320 0x20 0x8500 0x100 0x113b0 0x1>;
+   local-mac-address = [ 00 01 02 03 04 08 ];
+   interrupts = <33 8>;
+   interrupt-parent = <&PIC>;
+   phy-handle = <&phy1>;
+   linux,network-index = <2>;
+   fsl,cpm-command = <0x16200300>;
+   };
};

PIC: interrupt-control...@10c00 {
diff --git a/arch/powerpc/platforms/82xx/mgcoge.c 
b/arch/powerpc/platforms/82xx/mgcoge.c
index c2af169..7a5de9e 100644
--- a/arch/powerpc/platforms/82xx/mgcoge.c
+++ b/arch/powerpc/platforms/82xx/mgcoge.c
@@ -50,16 +50,63 @@ struct cpm_pin {
 static __initdata struct cpm_pin mgcoge_pins[] = {

/* SMC2 */
-   {1, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
-   {1, 9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+   {0, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+   {0, 9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},

/* SCC4 */
-   {3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
-   {3, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
-   {3,  9, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
-   {3,  8, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
-   {4, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
-   {4, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+   

Re: 82xx, mgcoge: updates for 2.6.32

2009-07-29 Thread Heiko Schocher
Hello Kumar,

Kumar Gala wrote:
> 
> On Jul 29, 2009, at 3:32 AM, Heiko Schocher wrote:
> 
>> - add I2C support
>> - add FCC1 and FCC2 support
>> - fix bogus gpio numbering in plattformcode
>>
>> Signed-off-by: Heiko Schocher 
>> ---
>> - based on git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
>>  next branch
>> - checked with checkpatch.pl:
>> $ ./scripts/checkpatch.pl 0001-82xx-mgcoge-updates-for-2.6.32.patch
>> total: 0 errors, 0 warnings, 531 lines checked
>>
>> 0001-82xx-mgcoge-updates-for-2.6.32.patch has no obvious style
>> problems and is ready for submission.
>> $
>>
>> BTW: Who is PPC82XX Maintainer? I couldn;t find such an entry
>> in the MAINTAINERS file ...
> 
> its me.

Ah, thought it, but I wasn;t sure ... Hmm, maybe you can update
the MAINTAINERS entry?

>> arch/powerpc/boot/dts/mgcoge.dts  |   56 ++
>> arch/powerpc/configs/mgcoge_defconfig |  178
>> +---
> 
> Can we hold off or pull the defconfig update into a separate patch.  I
> normally update defconfigs in a late -rc series and that will probably
> generate merge conflicts.

I make a seperate patch for the defconfig.

Thanks. I wait for more comments, before I post the next version
of this patch.
bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: 82xx, mgcoge: updates for 2.6.32

2009-07-29 Thread Heiko Schocher
Hello David,

David Gibson wrote:
> On Wed, Jul 29, 2009 at 10:32:30AM +0200, Heiko Schocher wrote:
> 
> [snip]
>> +m...@10d40 {
>> +device_type = "mdio";
> 
> Drop this device_type.

Done.

>> +compatible = "fsl,cpm2-mdio-bitbang";
>> +reg = <0x10d00 0x14>;
>> +#address-cells = <1>;
>> +#size-cells = <0>;
>> +fsl,mdio-pin = <12>;
>> +fsl,mdc-pin = <13>;
>> +
>> +phy0: ethernet-...@0 {
>> +reg = <0x0>;
>> +device_type = "ethernet-phy";
> 
> And this one, too.

Done.

>> +};
>> +
>> +phy1: ethernet-...@1 {
>> +reg = <0x1>;
>> +device_type = "ethernet-phy";
>> +};
>> +};
> 

I collect more comments, then the patch follows.
Thanks
bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


82xx, mgcoge: updates for 2.6.32

2009-07-29 Thread Heiko Schocher
- add I2C support
- add FCC1 and FCC2 support
- fix bogus gpio numbering in plattformcode

Signed-off-by: Heiko Schocher 
---
- based on git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
  next branch
- checked with checkpatch.pl:
$ ./scripts/checkpatch.pl 0001-82xx-mgcoge-updates-for-2.6.32.patch
total: 0 errors, 0 warnings, 531 lines checked

0001-82xx-mgcoge-updates-for-2.6.32.patch has no obvious style problems and is 
ready for submission.
$

BTW: Who is PPC82XX Maintainer? I couldn;t find such an entry
 in the MAINTAINERS file ...

 arch/powerpc/boot/dts/mgcoge.dts  |   56 ++
 arch/powerpc/configs/mgcoge_defconfig |  178 +---
 arch/powerpc/platforms/82xx/mgcoge.c  |   69 +++--
 3 files changed, 255 insertions(+), 48 deletions(-)

diff --git a/arch/powerpc/boot/dts/mgcoge.dts b/arch/powerpc/boot/dts/mgcoge.dts
index 633255a..a2efc36 100644
--- a/arch/powerpc/boot/dts/mgcoge.dts
+++ b/arch/powerpc/boot/dts/mgcoge.dts
@@ -162,6 +162,62 @@
fixed-link = <0 0 10 0 0>;
};

+   i...@11860 {
+   compatible = "fsl,mpc8272-i2c",
+"fsl,cpm2-i2c";
+   reg = <0x11860 0x20 0x8afc 0x2>;
+   interrupts = <1 8>;
+   interrupt-parent = <&PIC>;
+   fsl,cpm-command = <0x2960>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   };
+
+   m...@10d40 {
+   device_type = "mdio";
+   compatible = "fsl,cpm2-mdio-bitbang";
+   reg = <0x10d00 0x14>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   fsl,mdio-pin = <12>;
+   fsl,mdc-pin = <13>;
+
+   phy0: ethernet-...@0 {
+   reg = <0x0>;
+   device_type = "ethernet-phy";
+   };
+
+   phy1: ethernet-...@1 {
+   reg = <0x1>;
+   device_type = "ethernet-phy";
+   };
+   };
+
+   /* FCC1 management to switch */
+   ether...@11300 {
+   device_type = "network";
+   compatible = "fsl,cpm2-fcc-enet";
+   reg = <0x11300 0x20 0x8400 0x100 0x11390 0x1>;
+   local-mac-address = [ 00 01 02 03 04 07 ];
+   interrupts = <32 8>;
+   interrupt-parent = <&PIC>;
+   phy-handle = <&phy0>;
+   linux,network-index = <1>;
+   fsl,cpm-command = <0x12000300>;
+   };
+
+   /* FCC2 to redundant core unit over backplane */
+   ether...@11320 {
+   device_type = "network";
+   compatible = "fsl,cpm2-fcc-enet";
+   reg = <0x11320 0x20 0x8500 0x100 0x113b0 0x1>;
+   local-mac-address = [ 00 01 02 03 04 08 ];
+   interrupts = <33 8>;
+   interrupt-parent = <&PIC>;
+   phy-handle = <&phy1>;
+   linux,network-index = <2>;
+   fsl,cpm-command = <0x16200300>;
+   };
};

PIC: interrupt-control...@10c00 {
diff --git a/arch/powerpc/configs/mgcoge_defconfig 
b/arch/powerpc/configs/mgcoge_defconfig
index 31e1df6..a6fe6b0 100644
--- a/arch/powerpc/configs/mgcoge_defconfig
+++ b/arch/powerpc/configs/mgcoge_defconfig
@@ -1,25 +1,27 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.30-rc3
-# Wed May 13 17:21:55 2009
+# Linux kernel version: 2.6.31-rc4
+# Wed Jul 29 08:57:10 2009
 #
 # CONFIG_PPC64 is not set

 #
 # Processor support
 #
-CONFIG_6xx=y
+CONFIG_PPC_BOOK3S_32=y
 # CONFIG_PPC_85xx is not set
 # CONFIG_PPC_8xx is not set
 # CONFIG_40x is not set
 # CONFIG_44x is not set
 # CONFIG_E200 is not set
 CONFIG_PPC_BOOK3S=y
+CONFIG_6xx=y
 CONFIG_PPC_FPU=y
 # CONFIG_ALTIVEC is not s

[PATCH v5] 83xx: add support for the kmeter1 board.

2009-06-15 Thread Heiko Schocher
The following series implements basic board support for
the kmeter1 board from keymile, based on a MPC8360.

This series provides the following functionality:

- The board can boot with a serial console on UART1
- Ethernet:
UCC1 in RGMII mode
UCC2 in RGMII mode
UCC4 in RMII mode
UCC5 in RMII mode
UCC6 in RMII mode
UCC7 in RMII mode
UCC8 in RMII mode

following patch is necessary for working UCC in RMII mode:

http://lists.ozlabs.org/pipermail/linuxppc-dev/2009-April/070804.html

- Flash accessed via MTD layer

  On this hardware there is an Intel P30 flash, following patch
  series is necessary for working with this hardware:

  http://lists.ozlabs.org/pipermail/linuxppc-dev/2009-April/070624.html

- I2C using I2C Bus 1 from the MPC8360 cpu

Signed-off-by: Heiko Schocher 
---
changes since v1:
- added comments from Kumar Gala and Scott Wood
- get rid of using get_immrbase() in board specific code

changes since v2:
- added comments from Kumar Gala
- rebased against 1406de8e11eb043681297adf86d6892ff8efc27a
  from git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git

changes since v3:
- updated mailinglistarchivelinks for necessary patches in commit text.

changes since v4:
- added comments from David Gibson

$ ./scripts/checkpatch.pl 0001--83xx-add-support-for-the-kmeter1-board.patch
total: 0 errors, 0 warnings, 1636 lines checked

0001--83xx-add-support-for-the-kmeter1-board.patch has no obvious style 
problems and is ready for submission.
$

Signed-off-by: Heiko Schocher 
---
 arch/powerpc/boot/dts/kmeter1.dts   |  520 +++
 arch/powerpc/configs/83xx/kmeter1_defconfig |  908 +++
 arch/powerpc/platforms/83xx/Kconfig |7 +
 arch/powerpc/platforms/83xx/Makefile|1 +
 arch/powerpc/platforms/83xx/kmeter1.c   |  191 ++
 5 files changed, 1627 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/kmeter1.dts
 create mode 100644 arch/powerpc/configs/83xx/kmeter1_defconfig
 create mode 100644 arch/powerpc/platforms/83xx/kmeter1.c

diff --git a/arch/powerpc/boot/dts/kmeter1.dts 
b/arch/powerpc/boot/dts/kmeter1.dts
new file mode 100644
index 000..167044f
--- /dev/null
+++ b/arch/powerpc/boot/dts/kmeter1.dts
@@ -0,0 +1,520 @@
+/*
+ * Keymile KMETER1 Device Tree Source
+ *
+ * 2008 DENX Software Engineering GmbH
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+/ {
+   model = "KMETER1";
+   compatible = "keymile,KMETER1";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   aliases {
+   ethernet0 = &enet_piggy2;
+   ethernet1 = &enet_estar1;
+   ethernet2 = &enet_estar2;
+   ethernet3 = &enet_eth1;
+   ethernet4 = &enet_eth2;
+   ethernet5 = &enet_eth3;
+   ethernet6 = &enet_eth4;
+   serial0 = &serial0;
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,8...@0 {
+   device_type = "cpu";
+   reg = <0x0>;
+   d-cache-line-size = <32>;   // 32 bytes
+   i-cache-line-size = <32>;   // 32 bytes
+   d-cache-size = <32768>; // L1, 32K
+   i-cache-size = <32768>; // L1, 32K
+   timebase-frequency = <0>;   /* Filled in by U-Boot 
*/
+   bus-frequency = <0>;/* Filled in by U-Boot */
+   clock-frequency = <0>;  /* Filled in by U-Boot */
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0 0>;/* Filled in by U-Boot */
+   };
+
+   soc8...@e000 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   device_type = "soc";
+   compatible = "fsl,mpc8360-immr", "simple-bus";
+   ranges = <0x0 0xe000 0x0020>;
+   reg = <0xe000 0x0200>;
+   bus-frequency = <0>;/* Filled in by U-Boot */
+
+   i...@3000 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   cell-index = <0>;
+   compatible = "fsl-i2c";
+   reg = <0x3000 0x100>;
+   interrupts = <14 0x8>;
+   interrupt-parent = <&ipic&g

Re: [PATCH v4] 83xx: add support for the kmeter1 board.

2009-06-11 Thread Heiko Schocher
Hello David,

David Gibson wrote:
> On Thu, Jun 11, 2009 at 08:10:41PM +0200, Heiko Schocher wrote:
>> The following series implements basic board support for
>> the kmeter1 board from keymile, based on a MPC8360.
> 
> [snip]
>> +par...@1400 {
>> +reg = <0x1400 0x100>;
>> +device_type = "par_io";
> 
> This should have a compatible value instead of a device_type value.

compatible = "fsl,mpc8360-par_io"; ?

> [snip]
> 
>> +num-ports = <7>;
>> +
>> +pio_ucc1: ucc_...@00 {
> 
> Since these nodes have addresses, they should also have reg
> properties.  And the parent should have #address-cells and
> #size-cells.

added "#address-cells" and "#size-cells", but couldn;t find what
I should write in a "reg" entry ... I think something like that:

reg = <0x00 0x01>;

?

> [snip]
>> +q...@10 {
>> +#address-cells = <1>;
>> +#size-cells = <1>;
>> +device_type = "qe";
> 
> This device_type should not be here.

deleted.

>> +compatible = "fsl,qe";
>> +ranges = <0x0 0x10 0x10>;
>> +reg = <0x10 0x480>;
>> +clock-frequency = <0>;  /* Filled in by U-Boot */
>> +brg-frequency = <0>;/* Filled in by U-Boot */
>> +bus-frequency = <0>;/* Filled in by U-Boot */

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH v4] 83xx: add support for the kmeter1 board.

2009-06-11 Thread Heiko Schocher
The following series implements basic board support for
the kmeter1 board from keymile, based on a MPC8360.

This series provides the following functionality:

- The board can boot with a serial console on UART1
- Ethernet:
UCC1 in RGMII mode
UCC2 in RGMII mode
UCC4 in RMII mode
UCC5 in RMII mode
UCC6 in RMII mode
UCC7 in RMII mode
UCC8 in RMII mode

following patch is necessary for working UCC in RMII mode:

http://lists.ozlabs.org/pipermail/linuxppc-dev/2009-April/070804.html

- Flash accessed via MTD layer

  On this hardware there is an Intel P30 flash, following patch
  series is necessary for working with this hardware:

  http://lists.ozlabs.org/pipermail/linuxppc-dev/2009-April/070624.html

- I2C using I2C Bus 1 from the MPC8360 cpu

Signed-off-by: Heiko Schocher 
---
changes since v1:
- added comments from Kumar Gala and Scott Wood
- get rid of using get_immrbase() in board specific code

changes since v2:
- added comments from Kumar Gala
- rebased against 1406de8e11eb043681297adf86d6892ff8efc27a
  from git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git

changes since v3:
- updated mailinglistarchivelinks for necessary patches in commit text.

$ ./scripts/checkpatch.pl 0001--83xx-add-support-for-the-kmeter1-board.patch
total: 0 errors, 0 warnings, 1618 lines checked

0001--83xx-add-support-for-the-kmeter1-board.patch has no obvious style 
problems and is ready for submission.
$

 arch/powerpc/boot/dts/kmeter1.dts   |  505 +++
 arch/powerpc/configs/83xx/kmeter1_defconfig |  908 +++
 arch/powerpc/platforms/83xx/Kconfig |7 +
 arch/powerpc/platforms/83xx/Makefile|1 +
 arch/powerpc/platforms/83xx/kmeter1.c   |  188 ++
 5 files changed, 1609 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/kmeter1.dts
 create mode 100644 arch/powerpc/configs/83xx/kmeter1_defconfig
 create mode 100644 arch/powerpc/platforms/83xx/kmeter1.c

diff --git a/arch/powerpc/boot/dts/kmeter1.dts 
b/arch/powerpc/boot/dts/kmeter1.dts
new file mode 100644
index 000..768813a
--- /dev/null
+++ b/arch/powerpc/boot/dts/kmeter1.dts
@@ -0,0 +1,505 @@
+/*
+ * Keymile KMETER1 Device Tree Source
+ *
+ * 2008 DENX Software Engineering GmbH
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+/ {
+   model = "KMETER1";
+   compatible = "keymile,KMETER1";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   aliases {
+   ethernet0 = &enet_piggy2;
+   ethernet1 = &enet_estar1;
+   ethernet2 = &enet_estar2;
+   ethernet3 = &enet_eth1;
+   ethernet4 = &enet_eth2;
+   ethernet5 = &enet_eth3;
+   ethernet6 = &enet_eth4;
+   serial0 = &serial0;
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,8...@0 {
+   device_type = "cpu";
+   reg = <0x0>;
+   d-cache-line-size = <32>;   // 32 bytes
+   i-cache-line-size = <32>;   // 32 bytes
+   d-cache-size = <32768>; // L1, 32K
+   i-cache-size = <32768>; // L1, 32K
+   timebase-frequency = <0>;   /* Filled in by U-Boot 
*/
+   bus-frequency = <0>;/* Filled in by U-Boot */
+   clock-frequency = <0>;  /* Filled in by U-Boot */
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0 0>;/* Filled in by U-Boot */
+   };
+
+   soc8...@e000 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   device_type = "soc";
+   compatible = "fsl,mpc8360-immr", "simple-bus";
+   ranges = <0x0 0xe000 0x0020>;
+   reg = <0xe000 0x0200>;
+   bus-frequency = <0>;/* Filled in by U-Boot */
+
+   i...@3000 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   cell-index = <0>;
+   compatible = "fsl-i2c";
+   reg = <0x3000 0x100>;
+   interrupts = <14 0x8>;
+   interrupt-parent = <&ipic>;
+   dfsrr;
+   };
+
+  

Re: [PATCH v3] 83xx: add support for the kmeter1 board.

2009-06-11 Thread Heiko Schocher
Hello Kumar,

Kumar Gala wrote:
> On Jun 11, 2009, at 1:16 AM, Heiko Schocher wrote:
> 
>> The following series implements basic board support for
>> the kmeter1 board from keymile, based on a MPC8360.
>>
>> This series provides the following functionality:
>>
>> - The board can boot with a serial console on UART1
>> - Ethernet:
>>UCC1 in RGMII mode
>>UCC2 in RGMII mode
>>UCC4 in RMII mode
>>UCC5 in RMII mode
>>UCC6 in RMII mode
>>UCC7 in RMII mode
>>UCC8 in RMII mode
>>
>>following patch is necessary for working UCC in RMII mode:
>>
>>http://ozlabs.org/pipermail/linuxppc-dev/2009-April/070909.html
>>
>> - Flash accessed via MTD layer
>>
>>  On this hardware there is an Intel P30 flash, following patch
>>  series is necessary for working with this hardware:
>>
>>  http://ozlabs.org/pipermail/linuxppc-dev/2009-April/070716.html
> 
> the links are stale since the ozlabs.org rebuilt and moved the
> maillist.. mind updating.

Ups, sorry, copy and paste error ...

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH v3] 83xx: add support for the kmeter1 board.

2009-06-10 Thread Heiko Schocher
The following series implements basic board support for
the kmeter1 board from keymile, based on a MPC8360.

This series provides the following functionality:

- The board can boot with a serial console on UART1
- Ethernet:
UCC1 in RGMII mode
UCC2 in RGMII mode
UCC4 in RMII mode
UCC5 in RMII mode
UCC6 in RMII mode
UCC7 in RMII mode
UCC8 in RMII mode

following patch is necessary for working UCC in RMII mode:

http://ozlabs.org/pipermail/linuxppc-dev/2009-April/070909.html

- Flash accessed via MTD layer

  On this hardware there is an Intel P30 flash, following patch
  series is necessary for working with this hardware:

  http://ozlabs.org/pipermail/linuxppc-dev/2009-April/070716.html

- I2C using I2C Bus 1 from the MPC8360 cpu

Signed-off-by: Heiko Schocher 
---
changes since v1:
- added comments from Kumar Gala and Scott Wood
- get rid of using get_immrbase() in board specific code

changes since v2:
- added comments from Kumar Gala
- rebased against 1406de8e11eb043681297adf86d6892ff8efc27a
  from git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git

$ ./scripts/checkpatch.pl 0001--83xx-add-support-for-the-kmeter1-board.patch
total: 0 errors, 0 warnings, 1618 lines checked

0001--83xx-add-support-for-the-kmeter1-board.patch has no obvious style 
problems and is ready for submission.
$

 arch/powerpc/boot/dts/kmeter1.dts   |  505 +++
 arch/powerpc/configs/83xx/kmeter1_defconfig |  908 +++
 arch/powerpc/platforms/83xx/Kconfig |7 +
 arch/powerpc/platforms/83xx/Makefile|1 +
 arch/powerpc/platforms/83xx/kmeter1.c   |  188 ++
 5 files changed, 1609 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/kmeter1.dts
 create mode 100644 arch/powerpc/configs/83xx/kmeter1_defconfig
 create mode 100644 arch/powerpc/platforms/83xx/kmeter1.c

diff --git a/arch/powerpc/boot/dts/kmeter1.dts 
b/arch/powerpc/boot/dts/kmeter1.dts
new file mode 100644
index 000..768813a
--- /dev/null
+++ b/arch/powerpc/boot/dts/kmeter1.dts
@@ -0,0 +1,505 @@
+/*
+ * Keymile KMETER1 Device Tree Source
+ *
+ * 2008 DENX Software Engineering GmbH
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+/ {
+   model = "KMETER1";
+   compatible = "keymile,KMETER1";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   aliases {
+   ethernet0 = &enet_piggy2;
+   ethernet1 = &enet_estar1;
+   ethernet2 = &enet_estar2;
+   ethernet3 = &enet_eth1;
+   ethernet4 = &enet_eth2;
+   ethernet5 = &enet_eth3;
+   ethernet6 = &enet_eth4;
+   serial0 = &serial0;
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,8...@0 {
+   device_type = "cpu";
+   reg = <0x0>;
+   d-cache-line-size = <32>;   // 32 bytes
+   i-cache-line-size = <32>;   // 32 bytes
+   d-cache-size = <32768>; // L1, 32K
+   i-cache-size = <32768>; // L1, 32K
+   timebase-frequency = <0>;   /* Filled in by U-Boot 
*/
+   bus-frequency = <0>;/* Filled in by U-Boot */
+   clock-frequency = <0>;  /* Filled in by U-Boot */
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0 0>;/* Filled in by U-Boot */
+   };
+
+   soc8...@e000 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   device_type = "soc";
+   compatible = "fsl,mpc8360-immr", "simple-bus";
+   ranges = <0x0 0xe000 0x0020>;
+   reg = <0xe000 0x0200>;
+   bus-frequency = <0>;/* Filled in by U-Boot */
+
+   i...@3000 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   cell-index = <0>;
+   compatible = "fsl-i2c";
+   reg = <0x3000 0x100>;
+   interrupts = <14 0x8>;
+   interrupt-parent = <&ipic>;
+   dfsrr;
+   };
+
+   serial0: ser...@4500 {
+   cell-index = <0>;
+   de

Re: [PATCH v2] 83xx: add support for the kmeter1 board.

2009-06-10 Thread Heiko Schocher
Hello Kumar,

Kumar Gala wrote:
> On Apr 28, 2009, at 11:48 PM, Heiko Schocher wrote:
> 
>> The following series implements basic board support for
>> the kmeter1 board from keymile, based on a MPC8360.
[...]
>> +};
>> +};
>> +};
> 
> Sorry for taking so long to review this again.

No problem, we are all just working

Reworked patch with your comments will follow, thanks.

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash, size

2009-05-14 Thread Heiko Schocher
Hello Scott,

Scott Wood wrote:
> On Wed, May 13, 2009 at 08:27:07AM +0200, Heiko Schocher wrote:
>> Hello Wolfgang,
>>
>>> The current device tree for the MPC8272ADS assumes a mapping of 32 MB
>>> of NOR flash at 0xFE00., while there are actually only 8 MB on
>>> the boards, mapped at 0xFF80.. When booting an uImage with such a
>>> device tree, the kernel crashes because 0xFE00. is not mapped.
>> Wouldn;t it be better, if u-boot fixes the device tree entries?
> 
> We should proabbly leave out the ranges altogether, and have u-boot
> populate it from the mappings it establishes.

No, I vote for manipulating just the entries, which u-boot dynamically
detect, and let the other entries untouched. It is possible that
there is a device which u-boot didn;t use/know, and there is in the DTS
an ranges entry for it (Maybe not on the MPC8727ADS, but we should
define a rule, how a bootloader has to manipulate entries). So if
u-boot build the complete ranges entry, it maybe miss something.

>> I think, u-boot should know, where the flash begins and ends, and
>> because this is maybe a dynamic variable for this board, it should
>> be better, if u-boot fixes this, so no need for adding a device tree
>> for every board variant.
> 
> Flash is on a SIMM on this board, and the board manual says it's
> expandable to 32 MiB.  However, I suspect that the current DTS was just
> an error as I based it on a board that had not had its flash SIMM
> modified.  That specific flash SIMM is no longer working (or perhaps just
> got its contents corrupted -- one of these days I may hook up a BDI and
> try to reflash), so I can't go back and check.
> 
> I don't see how current u-boot would accomodate more than 8MiB flash on
> this board (there's some detection in board/freescale/mpc8260ads/flash.c,

Didn;t this board uses the CFI driver? :-(

> but I don't see any setting of BR0 besides the preliminary value at
> 0xff80).

OK, then the patch from Wolfgang should be sufficient.

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash, size

2009-05-12 Thread Heiko Schocher
Hello Wolfgang,

> The current device tree for the MPC8272ADS assumes a mapping of 32 MB
> of NOR flash at 0xFE00., while there are actually only 8 MB on
> the boards, mapped at 0xFF80.. When booting an uImage with such a
> device tree, the kernel crashes because 0xFE00. is not mapped.

Wouldn;t it be better, if u-boot fixes the device tree entries?
I think, u-boot should know, where the flash begins and ends, and
because this is maybe a dynamic variable for this board, it should
be better, if u-boot fixes this, so no need for adding a device tree
for every board variant.

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] 83xx: add support for the kmeter1 board.

2009-05-07 Thread Heiko Schocher
Hello Christopher,

Varlese, Christopher wrote:
> (FYI I working on the kmeter1)
> 
> kmeter1.c reuses the same QE_ENET10 RGMII errata workaround code from 
> mpc836x_mds.c (MPC8360EMDS eval board).
> 
> In my view errata nodes in the dts is overkill.   Maybe the errata code can 
> go into a reusable function somewhere in 83xx/ or in ucc_geth.c?

To put an errata node in the dts was just an idea ;-)
I also mentioned putting this code in the ucc_geth.c driver ...

> I also think the original errata code needs improving:
>   - mask some SVR bits so activated for all matching CPU models, e.g. 
> MPC8360 & MPC8360E.

Did a first try in my v2 patch, see:

http://ozlabs.org/pipermail/linuxppc-dev/2009-April/071384.html

but I got no response yet.

>   - The code in mpc836x_mds.c and kmeter1.c does not do exactly what 
> Freescale errata says!

:-(

> Here the errata document:
>   http://www.freescale.com/files/32bit/doc/errata/MPC8360ECE.pdf
> 
> Because kmeter1 is using an MPC8360 CPU model the workaround doesn't actually 
> trigger.  So to kill 2 birds with 1 stone we tested a Uboot patch (below) 
> doing what QE_ENET10 says.   It seemed to work fine for us.
> /* RGMII timing Errata workaround for rev 2.1 silicon
>  * (ref: MPC8360ECE rev.1 12/2007 QE_ENET10 UCC2 option 1)
>  */
> void *reg = (void *)(CONFIG_SYS_IMMR + 0x14ac);
> clrsetbits_be32 (reg, 0x00F0, 0x00A0);
> 
>>From my point of view:
>   - The workaround code in kmeter1.c could go for now.
>   - An improved errata workaround for 836x boards would be nice (..who is 
> motivated? :-))

I can make this errata, if someone gives advice, where to put ...
I vote for putting it into the ucc_geth.c driver, and activating it
maybe through the "phy-connection-type" if it activates the rgmii
mode ... ?

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH v2] 83xx: add support for the kmeter1 board.

2009-04-28 Thread Heiko Schocher
The following series implements basic board support for
the kmeter1 board from keymile, based on a MPC8360.

This series provides the following functionality:

- The board can boot with a serial console on UART1
- Ethernet:
UCC1 in RGMII mode
UCC2 in RGMII mode
UCC4 in RMII mode
UCC5 in RMII mode
UCC6 in RMII mode
UCC7 in RMII mode
UCC8 in RMII mode

following patch is necessary for working UCC in RMII mode:

http://ozlabs.org/pipermail/linuxppc-dev/2009-April/070909.html

- Flash accessed via MTD layer

  On this hardware there is an Intel P30 flash, following patch
  series is necessary for working with this hardware:

  http://ozlabs.org/pipermail/linuxppc-dev/2009-April/070716.html

- I2C using I2C Bus 1 from the MPC8360 cpu

Signed-off-by: Heiko Schocher 
---
changes since v1:
- added comments from Kumar Gala and Scott Wood
- get rid of using get_immrbase() in board specific code

$ ./scripts/checkpatch.pl 
0001--Patch-v2-83xx-add-support-for-the-kmeter1-board.patch
total: 0 errors, 0 warnings, 1626 lines checked

0001--Patch-v2-83xx-add-support-for-the-kmeter1-board.patch has no obvious 
style problems and is ready for submission.

 arch/powerpc/boot/dts/kmeter1.dts   |  513 +++
 arch/powerpc/configs/83xx/kmeter1_defconfig |  908 +++
 arch/powerpc/platforms/83xx/Kconfig |7 +
 arch/powerpc/platforms/83xx/Makefile|1 +
 arch/powerpc/platforms/83xx/kmeter1.c   |  188 ++
 5 files changed, 1617 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/kmeter1.dts
 create mode 100644 arch/powerpc/configs/83xx/kmeter1_defconfig
 create mode 100644 arch/powerpc/platforms/83xx/kmeter1.c

diff --git a/arch/powerpc/boot/dts/kmeter1.dts 
b/arch/powerpc/boot/dts/kmeter1.dts
new file mode 100644
index 000..63c27da
--- /dev/null
+++ b/arch/powerpc/boot/dts/kmeter1.dts
@@ -0,0 +1,513 @@
+/*
+ * Keymile KMETER1 Device Tree Source
+ *
+ * 2008 DENX Software Engineering GmbH
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+/ {
+   model = "KMETER1";
+   compatible = "keymile,KMETER1";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   aliases {
+   ethernet0 = &enet_piggy2;
+   ethernet1 = &enet_estar1;
+   ethernet2 = &enet_estar2;
+   ethernet3 = &enet_eth1;
+   ethernet4 = &enet_eth2;
+   ethernet5 = &enet_eth3;
+   ethernet6 = &enet_eth4;
+   serial0 = &serial0;
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,8...@0 {
+   device_type = "cpu";
+   reg = <0x0>;
+   d-cache-line-size = <32>;   // 32 bytes
+   i-cache-line-size = <32>;   // 32 bytes
+   d-cache-size = <32768>; // L1, 32K
+   i-cache-size = <32768>; // L1, 32K
+   timebase-frequency = <0>;   /* Filled in by U-Boot 
*/
+   bus-frequency = <0>;/* Filled in by U-Boot */
+   clock-frequency = <0>;  /* Filled in by U-Boot */
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0 0>;/* Filled in by U-Boot */
+   };
+
+   soc8...@e000 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   device_type = "soc";
+   compatible = "simple-bus";
+   ranges = <0x0 0xe000 0x0020>;
+   reg = <0xe000 0x0200>;
+   bus-frequency = <0>;/* Filled in by U-Boot */
+
+   i...@3000 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   cell-index = <0>;
+   compatible = "fsl-i2c";
+   reg = <0x3000 0x100>;
+   interrupts = <14 0x8>;
+   interrupt-parent = <&ipic>;
+   dfsrr;
+   };
+
+   serial0: ser...@4500 {
+   cell-index = <0>;
+   device_type = "serial";
+   compatible = "ns16550";
+   reg = <0x4500 0x100>;
+   clock-frequency = <26400>;
+   

Re: [PATCH] 83xx: add support for the kmeter1 board.

2009-04-27 Thread Heiko Schocher
Hello Scott,

Scott Wood wrote:
> On Mon, Apr 27, 2009 at 07:38:38AM +0200, Heiko Schocher wrote:
>> 1) add in the soc node an "errata" node and in this "errata" node
>>we can add all CPU specific errata as an example the qe_enet10
>>errata, which above code covers:
> 
> What about errata discovered after the device tree is deployed?

Didn;t know that there are such errata. Ok, this is a problem.

>> soc8...@e000 {
>>  [...]
>> errata {
>> device_type = "errata";
> 
> device_type is deprecated except for a couple of legacy uses.  Please do
> not add new ones.

Ok.

>> compatible = "fsl,mpc83xx_errata";
> 
> To be bound to by an "errata driver"? :-P

Why not ;-) ?

>> #address-cells = <1>;
>> #size-cells = <1>;
>>
>> qe_ene...@14a8 {
>> device_type = "errata";
>> compatible = "fsl,mpc83xx_errata_qe_enet10";
>> reg = <0x14a8 0x08>;
> 
> But that register is part of the "QE parallel I/O port" block (even if it
> happens to be undocumented within that block), not part of the "QE ENET10
> erratum" block.  The device tree describes the hardware, not what you
> want to do with it.

Hmm.. isn;t this an errata for a buggy hardware? Why not describing this
in the dts?

> The presence of the erratum itself is indicated by the presence of the
> buggy device, possibly in conjunction with SVR if the device tree is not
> specific enough.

Ah, Ok, that was just an idea ... so, where and how to solve the qe_enet10
errata without using get_immrbase() (and I vote not to solve it as it
actuall is in board specific code, maybe as i proposed in an earlier mail
in the ucc_geth.c driver?)?

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] 83xx: add support for the kmeter1 board.

2009-04-26 Thread Heiko Schocher
Hello Kumar,

Kumar Gala wrote:
[...]
>> diff --git a/arch/powerpc/platforms/83xx/kmeter1.c
>> b/arch/powerpc/platforms/83xx/kmeter1.c
>> new file mode 100644
>> index 000..99cf5c6
>> --- /dev/null
>> +++ b/arch/powerpc/platforms/83xx/kmeter1.c
>> @@ -0,0 +1,170 @@
>> +/*
[...]
>> +np = of_find_compatible_node(NULL, "network", "ucc_geth");
>> +if (np != NULL) {
>> +uint svid;
>> +
>> +/* handle mpc8360ea rev.2.1 erratum 2: RGMII Timing */
>> +svid = mfspr(SPRN_SVR);
>> +if (svid == 0x80480021) {
>> +void __iomem *immap;
>> +
>> +immap = ioremap(get_immrbase() + 0x14a8, 8);
> 
> we should add a proper device node to cover whatever register space this
> is.


What if we do something like the following:

1) add in the soc node an "errata" node and in this "errata" node
   we can add all CPU specific errata as an example the qe_enet10
   errata, which above code covers:

soc8...@e000 {
[...]
errata {
device_type = "errata";
compatible = "fsl,mpc83xx_errata";
#address-cells = <1>;
#size-cells = <1>;

qe_ene...@14a8 {
device_type = "errata";
compatible = "fsl,mpc83xx_errata_qe_enet10";
reg = <0x14a8 0x08>;
};
};
[...]
};

2) we add in arch/powerpc/sysdev/fsl_soc.c a

   static int __init mpc83xx_errata_init(void)

   function, which holds the code for the errata


If you agree with that, I can make a patch ...

Hmm.. Is it OK, if I first sent a v2 of the "83xx: add support for
the kmeter1 board." with the QE_ENET10 errata in kmeter1.c (as it is
also for the mpc836x_mds board), and then send a seperate patch, which
removes this errata from the two boards?

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] 83xx: add support for the kmeter1 board.

2009-04-23 Thread Heiko Schocher
Hello Kumar,

Kumar Gala wrote:
>> diff --git a/arch/powerpc/boot/dts/kmeter1.dts
>> b/arch/powerpc/boot/dts/kmeter1.dts
>> new file mode 100644
>> index 000..4f343ca
>> --- /dev/null
>> +++ b/arch/powerpc/boot/dts/kmeter1.dts
>> @@ -0,0 +1,518 @@
>> +/*
>> + * Keymile KMETER1 Device Tree Source
>> + *

[...]

>> +
>> +
>> +/*
>> +/memreserve/ 100;
>> +*/
> 
> is this needed for something?

No, I delete it.

>>
>> +
>> +/dts-v1/;
>> +
>> +/ {
>> +model = "KMETER1";

[...]

>> +
>> +cpus {
>> +#address-cells = <1>;
>> +#size-cells = <0>;
>> +
>> +PowerPC,8...@0 {
>> +device_type = "cpu";
>> +reg = <0x0>;
>> +d-cache-line-size = <32>;// 32 bytes
>> +i-cache-line-size = <32>;// 32 bytes
>> +d-cache-size = <32768>;// L1, 32K
>> +i-cache-size = <32768>;// L1, 32K
>> +timebase-frequency = <6600>;
>> +bus-frequency = <26400>;
>> +clock-frequency = <52800>;
> 
> is the board running at a fixed frequency that isn't possible to change?

No, u-boot updates this. I fix this.

>> +};
>> +};
>> +
>> +memory {
>> +device_type = "memory";
>> +reg = <0x 0x1000>;
>> +};
> 
> does u-boot not set this?  Also is the amount of memory fixed?

No, u-boot updates this. I fix this too. (and all other places)

>> +
>> +soc8...@e000 {
>> +#address-cells = <1>;
>> +#size-cells = <1>;
>> +device_type = "soc";
>> +compatible = "simple-bus";

[...]

>> +};
>> +};
>> +
>> +q...@e010 {
> 
> why isn't this under the SOC?

No reason for that, you are right, I fix this too.

>>
>> +#address-cells = <1>;
>> +#size-cells = <1>;
>> +device_type = "qe";
>> +compatible = "fsl,qe";
>> +ranges = <0x0 0xe010 0x0010>;
>> +reg = <0xe010 0x480>;
>> +brg-frequency = <0>;
>> +bus-frequency = <39600>;
>> +

[...]

>> +
>> +qeic: interrupt-control...@80 {
>> +interrupt-controller;
>> +compatible = "fsl,qe-ic";
>> +#address-cells = <0>;
>> +#interrupt-cells = <1>;
>> +reg = <0x80 0x80>;
>> +big-endian;
> 
> seems unnecessary .. the qe is only big-endian.

OK.

>> +interrupts = <32 8 33 8>;
>> +interrupt-parent = <&ipic>;
>> +};
>> +};
> 
> 
>> diff --git a/arch/powerpc/platforms/83xx/kmeter1.c
>> b/arch/powerpc/platforms/83xx/kmeter1.c
>> new file mode 100644
>> index 000..99cf5c6
>> --- /dev/null
>> +++ b/arch/powerpc/platforms/83xx/kmeter1.c
>> @@ -0,0 +1,170 @@
>> +/*
>> + * Copyright 2008 DENX Software Engineering GmbH
>> + * Author: Heiko Schocher 

[...]

>> +
>> +np = of_find_compatible_node(NULL, "network", "ucc_geth");
>> +if (np != NULL) {
>> +uint svid;
>> +
>> +/* handle mpc8360ea rev.2.1 erratum 2: RGMII Timing */
>> +svid = mfspr(SPRN_SVR);
>> +if (svid == 0x80480021) {
>> +void __iomem *immap;
>> +
>> +immap = ioremap(get_immrbase() + 0x14a8, 8);
> 
> we should add a proper device node to cover whatever register space this
> is.

Hmm... in the MPC8360ERM.pdf this is a "reserved" register ... This
"register" is mentioned in the MPC8360ECE.pdf for this CPU in
Table 4. RGMII Programmable I/O Delay Work Arounds in the QE_ENET10
section.

So this is a MPC8360E, MPC8358E specific errata, so shouldn;t
we add this fix in the drivers/net/ucc_geth.c driver so all
boards have this fix?

thanks for commenting
bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] 83xx: add support for the kmeter1 board.

2009-04-23 Thread Heiko Schocher
The following series implements basic board support for
the kmeter1 board from keymile, based on a MPC8360.

This series provides the following functionality:

- The board can boot with a serial console on UART1
- Ethernet:
UCC1 in RGMII mode
UCC2 in RGMII mode
UCC4 in RMII mode
UCC5 in RMII mode
UCC6 in RMII mode
UCC7 in RMII mode
UCC8 in RMII mode

following patch is necessary for working UCC in RMII mode:

http://ozlabs.org/pipermail/linuxppc-dev/2009-April/070909.html

- Flash accessed via MTD layer

  On this hardware there is an Intel P30 flash, following patch
  series is necessary for working with this hardware:

  http://ozlabs.org/pipermail/linuxppc-dev/2009-April/070716.html

- I2C using I2C Bus 1 from the MPC8360 cpu

Signed-off-by: Heiko Schocher 
---
$ ./scripts/checkpatch.pl 0001-83xx-add-support-for-the-kmeter1-board.patch
total: 0 errors, 0 warnings, 1613 lines checked

0001-83xx-add-support-for-the-kmeter1-board.patch has no obvious style problems 
and is ready for submission.

 arch/powerpc/boot/dts/kmeter1.dts   |  518 +++
 arch/powerpc/configs/83xx/kmeter1_defconfig |  908 +++
 arch/powerpc/platforms/83xx/Kconfig |7 +
 arch/powerpc/platforms/83xx/Makefile|1 +
 arch/powerpc/platforms/83xx/kmeter1.c   |  170 +
 5 files changed, 1604 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/kmeter1.dts
 create mode 100644 arch/powerpc/configs/83xx/kmeter1_defconfig
 create mode 100644 arch/powerpc/platforms/83xx/kmeter1.c

diff --git a/arch/powerpc/boot/dts/kmeter1.dts 
b/arch/powerpc/boot/dts/kmeter1.dts
new file mode 100644
index 000..4f343ca
--- /dev/null
+++ b/arch/powerpc/boot/dts/kmeter1.dts
@@ -0,0 +1,518 @@
+/*
+ * Keymile KMETER1 Device Tree Source
+ *
+ * 2008 DENX Software Engineering GmbH
+ *
+ * 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.
+ */
+
+
+/*
+/memreserve/    100;
+*/
+
+/dts-v1/;
+
+/ {
+   model = "KMETER1";
+   compatible = "keymile,KMETER1";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   aliases {
+   ethernet0 = &enet_piggy2;
+   ethernet1 = &enet_estar1;
+   ethernet2 = &enet_estar2;
+   ethernet3 = &enet_eth1;
+   ethernet4 = &enet_eth2;
+   ethernet5 = &enet_eth3;
+   ethernet6 = &enet_eth4;
+   serial0 = &serial0;
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,8...@0 {
+   device_type = "cpu";
+   reg = <0x0>;
+   d-cache-line-size = <32>;   // 32 bytes
+   i-cache-line-size = <32>;   // 32 bytes
+   d-cache-size = <32768>; // L1, 32K
+   i-cache-size = <32768>; // L1, 32K
+   timebase-frequency = <6600>;
+   bus-frequency = <26400>;
+   clock-frequency = <52800>;
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0x 0x1000>;
+   };
+
+   soc8...@e000 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   device_type = "soc";
+   compatible = "simple-bus";
+   ranges = <0x0 0xe000 0x0010>;
+   reg = <0xe000 0x0200>;
+   bus-frequency = <26400>;
+
+   i...@3000 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   cell-index = <0>;
+   compatible = "fsl-i2c";
+   reg = <0x3000 0x100>;
+   interrupts = <14 0x8>;
+   interrupt-parent = <&ipic>;
+   dfsrr;
+   };
+
+   serial0: ser...@4500 {
+   cell-index = <0>;
+   device_type = "serial";
+   compatible = "ns16550";
+   reg = <0x4500 0x100>;
+   clock-frequency = <26400>;
+   interrupts = <9 0x8>;
+   interrupt-parent = <&ipic>;
+   };
+
+   d...@82a8 {
+   #address-cells = &l

[PATCH] [net, 83xx] ucc_geth.c: Fix upsmr setting in RMII mode

2009-04-21 Thread Heiko Schocher
If using the UCC on a MPC8360 in RMII mode, don;t set
UCC_GETH_UPSMR_RPM bit in the upsmr register.

Signed-off-by: Heiko Schocher 
---
 drivers/net/ucc_geth.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index d3f39e8..44f8392 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -1394,7 +1394,8 @@ static int adjust_enet_interface(struct ucc_geth_private 
*ugeth)
(ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII_RXID) ||
(ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID) ||
(ugeth->phy_interface == PHY_INTERFACE_MODE_RTBI)) {
-   upsmr |= UCC_GETH_UPSMR_RPM;
+   if (ugeth->phy_interface != PHY_INTERFACE_MODE_RMII)
+   upsmr |= UCC_GETH_UPSMR_RPM;
switch (ugeth->max_speed) {
case SPEED_10:
upsmr |= UCC_GETH_UPSMR_R10M;
-- 
1.6.0.6

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: eth0: Could not attach to PHY

2009-01-22 Thread Heiko Schocher
Hello wael,

wael showair  wrote:
> i have a board with MPC8555 processor
> uboot version 1.1.6
> linux kernel 2.6.19-rc5
> ltib version: 6.2.2-sv
> gcc 3.4.3
> 
> it boots successfully
> i want to upgrade my linux kernel to 2.6.27
> i upgraded the following:
> ltib version 8.1.2-sv
> gcc 4.1
> linux kernel 2.6.27
> & i kept the uboot with the same version 1.1.6
> 
> the kernel booting stucks as follows:
> 
> *
> U-Boot 1.1.6 (Feb  8 2007 - 14:00:17)
[...]
> RPC: Registered tcp transport module.
> 24520:10 not found
> eth0: Could not attach to PHY

Here is your problem. For some reason, your network driver
couldnt find the PHY ... Maybe there is something changed
between 2.6.19-rc5 and 2.6.27.

> IP-Config: Failed to open eth0
> IP-Config: Failed to open eth1
> IP-Config: No network devices available.

and so, there is no network device ...

I have no 85xx board, but maybe following commit is something
for you:

gianfar: Convert gianfar to an of_platform_driver
author  Andy Fleming 
Tue, 16 Dec 2008 23:29:15 + (15:29 -0800)
committer   David S. Miller 
Tue, 16 Dec 2008 23:29:15 + (15:29 -0800)
commit  b31a1d8b41513b96e9c7ec2f68c5734cef0b26a4
treef8643c2fd1b137dd6c00bcd385ad36adfca4f540tree | snapshot
parent  257d938a0c17838c740eb68f0005b041444ac2c2commit | diff
gianfar: Convert gianfar to an of_platform_driver

Does the same for the accompanying MDIO driver, and then modifies the TBI
configuration method.  The old way used fields in einfo, which no longer
exists.  The new way is to create an MDIO device-tree node for each instance
of gianfar, and create a tbi-handle property to associate ethernet controllers
with the TBI PHYs they are connected to.

Signed-off-by: Andy Fleming 
Signed-off-by: David S. Miller 

--

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: Call Trace and scary messages on kernel 2.6.27-rc5

2008-09-08 Thread Heiko Schocher
Hello Rogerio,

Rogério Brito wrote onTue Sep 9 10:47:29 EST 2008:
> I just compiled a new 2.6.27-rc5 kernel for my standard Kurobox (an
> embedded NAS that has an MPC8241 CPU, if I'm not mistaken) and upon
> booting, I get these scary messages and Call Traces:
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> Linux version 2.6.27-rc5.try03 (rbrito at chagas) (gcc version 4.2.0) #4 Mon 
> Sep 8 21:12:13 BRT 2008
> (...)
> physmap platform flash device: 0040 at ffc0
> physmap-flash.0: Found 1 x16 devices at 0x0 in 8-bit bank
[...]
> 0x0030-0x0037 : "mtd_bootcode"
> kobject (c395b278): tried to init an initialized object, something is 
> seriously wrong.
> Call Trace:
> [c381dc80] [c000806c] show_stack+0x4c/0x16c (unreliable)
> [c381dcc0] [c013a308] kobject_init+0x64/0xa4
> [c381dcd0] [c013a920] kobject_init_and_add+0x30/0x78
> [c381dd10] [c0135574] blk_register_filter+0x4c/0x70
> [c381dd20] [c01340a4] add_disk+0x68/0xbc
> [c381dd40] [c01b1210] add_mtd_blktrans_dev+0x17c/0x2b4
> [c381dd60] [c01b1490] mtdblock_add_mtd+0x60/0x80
> [c381dd70] [c01b08d8] blktrans_notify_add+0x44/0x84
> [c381dd90] [c01ac118] add_mtd_device+0xa8/0x140
> [c381ddb0] [c01ad860] add_mtd_partitions+0x55c/0x6b0
> [c381de10] [c01b5cc4] physmap_flash_probe+0x2d8/0x318
> [c381de50] [c0175864] platform_drv_probe+0x20/0x30
> [c381de60] [c0174748] driver_probe_device+0xb8/0x1e8
> [c381de80] [c01738ec] bus_for_each_drv+0x70/0xac
> [c381deb0] [c01749c8] device_attach+0x84/0xa8
> [c381ded0] [c01736e0] bus_attach_device+0x6c/0x78
> [c381dee0] [c01720bc] device_add+0x47c/0x5c8
> [c381df30] [c0175d30] platform_device_add+0x14c/0x1b4
> [c381df50] [c03245fc] physmap_init+0x30/0x48
> [c381df60] [c0003874] do_one_initcall+0x38/0x1a0
> [c381dfd0] [c030a17c] kernel_init+0x88/0xf4
> [c381dff0] [c000fd4c] kernel_thread+0x44/0x60
> 0x0037-0x0038 : "mtd_status"
> kobject (c395b278): tried to init an initialized object, something is 
> seriously wrong.

Try this patch:

http://lists.infradead.org/pipermail/linux-mtd/2008-August/022874.html

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[FIX] fs_enet: Using mii-bitbang as module

2008-09-03 Thread Heiko Schocher
Hello Vitaly,

I tried to use the mii-bitbang driver (drivers/net/fs_enet/mii-bitbang.c)
as a module and got the following error, when inserting it with insmod:

~ # insmod fs_enet
eth0: fs_enet: a6:07:11:7f:de:26
~ # insmod mii-bitbang
mii_bitbang: module license 'unspecified' taints kernel.
mii_bitbang: Unknown symbol of_address_to_resource
mii_bitbang: Unknown symbol of_irq_to_resource
insmod: cannot insert 
'/lib/modules/2.6.27-rc5-01144-g967b424-dirty/kernel/drivers/net/fs_enet/mii-bitbang.ko':
 Unknown symbol in module (-1): No such file or directory
~ #

Following patch solves this. Maybe you add the other MODULE_ macros too?

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 drivers/net/fs_enet/mii-bitbang.c  |2 +
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/fs_enet/mii-bitbang.c 
b/drivers/net/fs_enet/mii-bitbang.c
index be4b72f..863ceed 100644
--- a/drivers/net/fs_enet/mii-bitbang.c
+++ b/drivers/net/fs_enet/mii-bitbang.c
@@ -26,6 +26,8 @@

 #include "fs_enet.h"

+MODULE_LICENSE("GPL");
+
 struct bb_info {
struct mdiobb_ctrl ctrl;
__be32 __iomem *dir;
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] [82xx] powerpc: Add support for mpc8247 based board MGCOGE from keymile.

2008-08-15 Thread Heiko Schocher
Hello Kumar,

Kumar Gala schrieb:
> On Jun 18, 2008, at 3:38 AM, Heiko Schocher wrote:
>> changes since the last patch:
>>
>> update the Portpin initialization.
>>
>> [powerpc]  Added support for the MPC8247 based board MGCOGE
>>   from Keymile.
>>
>> Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
>> ---
>> arch/powerpc/boot/dts/mgcoge.dts  |  174 +++
>> arch/powerpc/configs/mgcoge_defconfig |  900
>> +
>> arch/powerpc/platforms/82xx/Kconfig   |8 +
>> arch/powerpc/platforms/82xx/Makefile  |1 +
>> arch/powerpc/platforms/82xx/mgcoge.c  |  129 +
>> 5 files changed, 1212 insertions(+), 0 deletions(-)
>> create mode 100644 arch/powerpc/boot/dts/mgcoge.dts
>> create mode 100644 arch/powerpc/configs/mgcoge_defconfig
>> create mode 100644 arch/powerpc/platforms/82xx/mgcoge.c
> 
> This fails to compile for with 2.6.27-rc3:
> 
> drivers/net/fs_enet/mac-scc.c: In function 'restart':
> drivers/net/fs_enet/mac-scc.c:256: error: implicit declaration of
> function '__fs_out8'
> drivers/net/fs_enet/mac-scc.c:265: error: 'SCC_EB' undeclared (first use
> in this function)
> drivers/net/fs_enet/mac-scc.c:265: error: (Each undeclared identifier is
> reported only once
> drivers/net/fs_enet/mac-scc.c:265: error: for each function it appears in.)
> make[3]: *** [drivers/net/fs_enet/mac-scc.o] Error 1
> make[2]: *** [drivers/net/fs_enet] Error 2
> make[1]: *** [drivers/net] Error 2
> make: *** [drivers] Error 2
> make: *** Waiting for unfinished jobs

:-(

So in 2.6.27-rc3 lacks another patch from me :-( , see:

http://ozlabs.org/pipermail/linuxppc-dev/2008-June/057824.html

and I posted this patch First time in January 2008!

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: patches for 2.6.27... (Kumar Gala)

2008-08-05 Thread Heiko Schocher
Hello Kumar,

On Wed Jul 2 19:58:03 EST 2008 Heiko Schocher wrote:
>On Wednesday 02 July 2008, Kumar Gala wrote:
>> Please point out any patches that have been posted but havent made it
>> into a git tree related to Freescale chips.
>
> Here are 2 patches that I'd like to see in 2.6.27. They haven't made into
> any git tree as far as I know.
>
> http://ozlabs.org/pipermail/linuxppc-dev/2008-June/058118.html
>
> http://ozlabs.org/pipermail/linuxppc-dev/2008-June/057972.html

Can you tell me, if these patches go into the Tree?
I had generally acks for this boards, but didnt see them in any tree yet?

Are there some more issues?

TIA
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: patches for 2.6.27... (Kumar Gala)

2008-07-02 Thread Heiko Schocher
Hello Kumar,

On Wednesday 02 July 2008, Kumar Gala wrote:
> Please point out any patches that have been posted but havent made it
> into a git tree related to Freescale chips.

Here are 2 patches that I'd like to see in 2.6.27. They haven't made into
any git tree as far as I know.

http://ozlabs.org/pipermail/linuxppc-dev/2008-June/058118.html

http://ozlabs.org/pipermail/linuxppc-dev/2008-June/057972.html

thanks.
bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] [82xx] powerpc: Add support for mpc8247 based board MGCOGE from keymile.

2008-06-18 Thread Heiko Schocher
Hello,

changes since the last patch:

update the Portpin initialization.

[powerpc]  Added support for the MPC8247 based board MGCOGE
   from Keymile.

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/dts/mgcoge.dts  |  174 +++
 arch/powerpc/configs/mgcoge_defconfig |  900 +
 arch/powerpc/platforms/82xx/Kconfig   |8 +
 arch/powerpc/platforms/82xx/Makefile  |1 +
 arch/powerpc/platforms/82xx/mgcoge.c  |  129 +
 5 files changed, 1212 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mgcoge.dts
 create mode 100644 arch/powerpc/configs/mgcoge_defconfig
 create mode 100644 arch/powerpc/platforms/82xx/mgcoge.c

diff --git a/arch/powerpc/boot/dts/mgcoge.dts b/arch/powerpc/boot/dts/mgcoge.dts
new file mode 100644
index 000..633255a
--- /dev/null
+++ b/arch/powerpc/boot/dts/mgcoge.dts
@@ -0,0 +1,174 @@
+/*
+ * Device Tree for the MGCOGE plattform from keymile
+ *
+ * Copyright 2008 DENX Software Engineering GmbH
+ * Heiko Schocher <[EMAIL PROTECTED]>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+/ {
+   model = "MGCOGE";
+   compatible = "keymile,mgcoge";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   aliases {
+   ethernet0 = ð0;
+   serial0 = &smc2;
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,[EMAIL PROTECTED] {
+   device_type = "cpu";
+   reg = <0>;
+   d-cache-line-size = <32>;
+   i-cache-line-size = <32>;
+   d-cache-size = <16384>;
+   i-cache-size = <16384>;
+   timebase-frequency = <0>; /* Filled in by U-Boot */
+   clock-frequency = <0>; /* Filled in by U-Boot */
+   bus-frequency = <0>; /* Filled in by U-Boot */
+   };
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc8247-localbus",
+"fsl,pq2-localbus",
+"simple-bus";
+   #address-cells = <2>;
+   #size-cells = <1>;
+   reg = <0xf0010100 0x40>;
+
+   ranges = <0 0 0xfe00 0x0040
+ 5 0 0x5000 0x2000
+   >; /* Filled in by U-Boot */
+
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <0 0x0 0x40>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   bank-width = <1>;
+   device-width = <1>;
+   [EMAIL PROTECTED] {
+   label = "u-boot";
+   reg = <0 0x4>;
+   };
+   [EMAIL PROTECTED] {
+   label = "env";
+   reg = <0x4 0x2>;
+   };
+   [EMAIL PROTECTED] {
+   label = "kernel";
+   reg = <0x6 0x22>;
+   };
+   [EMAIL PROTECTED] {
+   label = "dtb";
+   reg = <0x28 0x2>;
+   };
+   };
+
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <5 0x0 0x200>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   bank-width = <2>;
+   device-width = <2>;
+   [EMAIL PROTECTED] {
+   label = "ramdisk";
+   reg = <0 0x7a>;
+   };
+   [EMAIL PROTECTED] {
+   label = "user";
+   reg = <0x7a 0x186>;
+   };
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0 0>; /* Filled in by U-Boot */
+   };
+
+   [EMAIL PROTECTED] {
+   #address-cells = <1>;
+   #si

Re: [PATCH] [82xx] powerpc: Add support for mpc8247 based board MGCOGE from keymile.

2008-06-16 Thread Heiko Schocher
Hello Scott,

Scott Wood wrote:
> On Mon, Jun 16, 2008 at 11:40:30AM +0200, Heiko Schocher wrote:
>> The reg entry is wrong, the Flash is on CS5. Here the updated version of
>> the patch:
> 
> You need to update the ranges property as well.

Sure, here the new patch:

[powerpc]  Added support for the MPC8247 based board MGCOGE
from Keymile.

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/dts/mgcoge.dts  |  174 +++
 arch/powerpc/configs/mgcoge_defconfig |  900 +
 arch/powerpc/platforms/82xx/Kconfig   |8 +
 arch/powerpc/platforms/82xx/Makefile  |1 +
 arch/powerpc/platforms/82xx/mgcoge.c  |  130 +
 5 files changed, 1213 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mgcoge.dts
 create mode 100644 arch/powerpc/configs/mgcoge_defconfig
 create mode 100644 arch/powerpc/platforms/82xx/mgcoge.c

diff --git a/arch/powerpc/boot/dts/mgcoge.dts b/arch/powerpc/boot/dts/mgcoge.dts
new file mode 100644
index 000..ecce20d
--- /dev/null
+++ b/arch/powerpc/boot/dts/mgcoge.dts
@@ -0,0 +1,174 @@
+/*
+ * Device Tree for the MGCOGE plattform from keymile
+ *
+ * Copyright 2008 DENX Software Engineering GmbH
+ * Heiko Schocher <[EMAIL PROTECTED]>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+/ {
+   model = "MGCOGE";
+   compatible = "keymile,mgcoge";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   aliases {
+   ethernet0 = ð0;
+   serial0 = &smc2;
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,[EMAIL PROTECTED] {
+   device_type = "cpu";
+   reg = <0>;
+   d-cache-line-size = <32>;
+   i-cache-line-size = <32>;
+   d-cache-size = <16384>;
+   i-cache-size = <16384>;
+   timebase-frequency = <0>; /* Filled in by U-Boot */
+   clock-frequency = <0>; /* Filled in by U-Boot */
+   bus-frequency = <0>; /* Filled in by U-Boot */
+   };
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc8247-localbus",
+"fsl,pq2-localbus",
+"simple-bus";
+   #address-cells = <2>;
+   #size-cells = <1>;
+   reg = <0xf0010100 0x40>;
+
+   ranges = <0 0 0xfe00 0x0040
+ 5 0 0x5000 0x2000
+   >; /* Filled in by U-Boot */
+
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <0 0x0 0x40>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   bank-width = <1>;
+   device-width = <1>;
+   [EMAIL PROTECTED] {
+   label = "u-boot";
+   reg = <0 0x4>;
+   };
+   [EMAIL PROTECTED] {
+   label = "env";
+   reg = <0x4 0x2>;
+   };
+   [EMAIL PROTECTED] {
+   label = "kernel";
+   reg = <0x6 0x22>;
+   };
+   [EMAIL PROTECTED] {
+   label = "dtb";
+   reg = <0x28 0x2>;
+   };
+   };
+
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <5 0x0 0x200>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   bank-width = <2>;
+   device-width = <2>;
+   [EMAIL PROTECTED] {
+   label = "ramdisk";
+   reg = <0 0x7a>;
+   };
+   [EMAIL PROTECTED] {
+   label = "user";
+   reg = <0x7a 0x186>;
+   };
+   };
+ 

Re: [PATCH] [82xx] powerpc: Add support for mpc8247 based board MGCOGE from keymile.

2008-06-16 Thread Heiko Schocher
Hello David,

David Gibson wrote:
> On Fri, Jun 13, 2008 at 06:33:08PM +0200, Heiko Schocher wrote:
>> Hello Scott,
>>
>> here comes the updated version for the mgcoge port, with your
>> suggestions:
>>
>> [powerpc] Added support for the MPC8247 based board MGCOGE
>>     from Keymile.
>>
>> Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
>> ---
>>  arch/powerpc/boot/dts/mgcoge.dts  |  174 +++
>>  arch/powerpc/configs/mgcoge_defconfig |  900 
>> +
>>  arch/powerpc/platforms/82xx/Kconfig   |8 +
>>  arch/powerpc/platforms/82xx/Makefile  |1 +
>>  arch/powerpc/platforms/82xx/mgcoge.c  |  130 +
>>  5 files changed, 1213 insertions(+), 0 deletions(-)
>>  create mode 100644 arch/powerpc/boot/dts/mgcoge.dts
>>  create mode 100644 arch/powerpc/configs/mgcoge_defconfig
>>  create mode 100644 arch/powerpc/platforms/82xx/mgcoge.c
>>
>> diff --git a/arch/powerpc/boot/dts/mgcoge.dts 
>> b/arch/powerpc/boot/dts/mgcoge.dts
>> new file mode 100644
>> index 000..54d49c5
>> --- /dev/null
>> +++ b/arch/powerpc/boot/dts/mgcoge.dts
> [snip]
[snip]
>> +[EMAIL PROTECTED],0 {
> 
>>From the 'reg' below and the 'ranges' above, this looks like it should
> be "[EMAIL PROTECTED],0".
> 
>> +compatible = "cfi-flash";
>> +reg = <1 0x0 0x200>;
>> +#address-cells = <1>;

The reg entry is wrong, the Flash is on CS5. Here the updated version of
the patch:

[powerpc]  Added support for the MPC8247 based board MGCOGE
   from Keymile.

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/dts/mgcoge.dts  |  174 +++
 arch/powerpc/configs/mgcoge_defconfig |  900 +
 arch/powerpc/platforms/82xx/Kconfig   |8 +
 arch/powerpc/platforms/82xx/Makefile  |1 +
 arch/powerpc/platforms/82xx/mgcoge.c  |  130 +
 5 files changed, 1213 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mgcoge.dts
 create mode 100644 arch/powerpc/configs/mgcoge_defconfig
 create mode 100644 arch/powerpc/platforms/82xx/mgcoge.c

diff --git a/arch/powerpc/boot/dts/mgcoge.dts b/arch/powerpc/boot/dts/mgcoge.dts
new file mode 100644
index 000..ecce20d
--- /dev/null
+++ b/arch/powerpc/boot/dts/mgcoge.dts
@@ -0,0 +1,174 @@
+/*
+ * Device Tree for the MGCOGE plattform from keymile
+ *
+ * Copyright 2008 DENX Software Engineering GmbH
+ * Heiko Schocher <[EMAIL PROTECTED]>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+/ {
+   model = "MGCOGE";
+   compatible = "keymile,mgcoge";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   aliases {
+   ethernet0 = ð0;
+   serial0 = &smc2;
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,[EMAIL PROTECTED] {
+   device_type = "cpu";
+   reg = <0>;
+   d-cache-line-size = <32>;
+   i-cache-line-size = <32>;
+   d-cache-size = <16384>;
+   i-cache-size = <16384>;
+   timebase-frequency = <0>; /* Filled in by U-Boot */
+   clock-frequency = <0>; /* Filled in by U-Boot */
+   bus-frequency = <0>; /* Filled in by U-Boot */
+   };
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc8247-localbus",
+"fsl,pq2-localbus",
+"simple-bus";
+   #address-cells = <2>;
+   #size-cells = <1>;
+   reg = <0xf0010100 0x40>;
+
+   ranges = <0 0 0xfe00 0x0040
+ 1 0 0x5000 0x2000
+   >; /* Filled in by U-Boot */
+
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <0 0x0 0x40>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   bank-width = <1>;
+   device-width = <1>;
+   [EMAIL PROTECTED] {
+   label = "

Re: [PATCH] [8xx] powerpc: Add support for the MPC852 based mgsuvd board from keymile.

2008-06-14 Thread Heiko Schocher
Hello Stephen,

Stephen Rothwell wrote:
> On Fri, 13 Jun 2008 21:56:00 +0200 Heiko Schocher <[EMAIL PROTECTED]> wrote:
>> +++ b/arch/powerpc/platforms/8xx/mgsuvd.c
>> @@ -0,0 +1,93 @@
>> +/* arch/powerpc/platforms/8xx/mgsuvd.c
> 
> We have stopped putting file names in files.
> 
>> +#include 
>> +#include 
>> +#include 
>> +
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
> 
> I am petty sure you don't need to include linux/device.h, but you should
> include asm/prom.h for the flat device tree accessors.
> 
> Also, we don't put a space between a function name and the opening
> parenthesis.

Argh, you are right!

here the updated patch for the mgsuvd board.

[powerpc]  add support for the MPC852 based mgsuvd board from
   keymile to arch/powerpc. Supported SMC1 (serial console),
   SCC3 Ethernet (10Mbps hdx).

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/dts/mgsuvd.dts  |  163 ++
 arch/powerpc/configs/mgsuvd_defconfig |  872 +
 arch/powerpc/platforms/8xx/Kconfig|6 +
 arch/powerpc/platforms/8xx/Makefile   |1 +
 arch/powerpc/platforms/8xx/mgsuvd.c   |   92 
 5 files changed, 1134 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mgsuvd.dts
 create mode 100644 arch/powerpc/configs/mgsuvd_defconfig
 create mode 100644 arch/powerpc/platforms/8xx/mgsuvd.c

diff --git a/arch/powerpc/boot/dts/mgsuvd.dts b/arch/powerpc/boot/dts/mgsuvd.dts
new file mode 100644
index 000..f78d5de
--- /dev/null
+++ b/arch/powerpc/boot/dts/mgsuvd.dts
@@ -0,0 +1,163 @@
+/*
+ * MGSUVD Device Tree Source
+ *
+ * Copyright 2008 DENX Software Engineering GmbH
+ * Heiko Schocher <[EMAIL PROTECTED]>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+/ {
+   model = "MGSUVD";
+   compatible = "keymile,mgsuvd";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,[EMAIL PROTECTED] {
+   device_type = "cpu";
+   reg = <0>;
+   d-cache-line-size = <16>;
+   i-cache-line-size = <16>;
+   d-cache-size = <8192>;
+   i-cache-size = <8192>;
+   timebase-frequency = <0>;   /* Filled in by u-boot 
*/
+   bus-frequency = <0>;/* Filled in by u-boot 
*/
+   clock-frequency = <0>;  /* Filled in by u-boot 
*/
+   interrupts = <15 2>;/* decrementer 
interrupt */
+   interrupt-parent = <&PIC>;
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = < 0x400>;  /* Filled in by u-boot */
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc852-localbus", "fsl,pq1-localbus", 
"simple-bus";
+   #address-cells = <2>;
+   #size-cells = <1>;
+   reg = <0xfff00100 0x40>;
+
+   ranges = <0 0 0xf000 0x0100>;  /* Filled in by u-boot */
+
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <0 0 0x100>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   bank-width = <1>;
+   device-width = <1>;
+   [EMAIL PROTECTED] {
+   label = "u-boot";
+   reg = <0 0x8>;
+   };
+   [EMAIL PROTECTED] {
+   label = "env";
+   reg = <0x8 0x2>;
+   };
+   [EMAIL PROTECTED] {
+   label = "kernel";
+   reg = <0xa 0x1e>;
+   };
+   [EMAIL PROTECTED] {
+   label = "dtb";
+   reg = <0x28 0x2>;
+   };
+   [EMAIL PROTECTED] {
+   label = "root&

Re: [PATCH] [8xx] powerpc: Add support for the MPC852 based mgsuvd board from keymile.

2008-06-13 Thread Heiko Schocher
Hello Scott,

here the next try for the mgsuvd board:

[powerpc]  add support for the MPC852 based mgsuvd board from
   keymile to arch/powerpc. Supported SMC1 (serial console),
   SCC3 Ethernet (10Mbps hdx).

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/dts/mgsuvd.dts  |  163 ++
 arch/powerpc/configs/mgsuvd_defconfig |  872 +
 arch/powerpc/platforms/8xx/Kconfig|6 +
 arch/powerpc/platforms/8xx/Makefile   |1 +
 arch/powerpc/platforms/8xx/mgsuvd.c   |   93 
 5 files changed, 1135 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mgsuvd.dts
 create mode 100644 arch/powerpc/configs/mgsuvd_defconfig
 create mode 100644 arch/powerpc/platforms/8xx/mgsuvd.c

diff --git a/arch/powerpc/boot/dts/mgsuvd.dts b/arch/powerpc/boot/dts/mgsuvd.dts
new file mode 100644
index 000..f78d5de
--- /dev/null
+++ b/arch/powerpc/boot/dts/mgsuvd.dts
@@ -0,0 +1,163 @@
+/*
+ * MGSUVD Device Tree Source
+ *
+ * Copyright 2008 DENX Software Engineering GmbH
+ * Heiko Schocher <[EMAIL PROTECTED]>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+/ {
+   model = "MGSUVD";
+   compatible = "keymile,mgsuvd";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,[EMAIL PROTECTED] {
+   device_type = "cpu";
+   reg = <0>;
+   d-cache-line-size = <16>;
+   i-cache-line-size = <16>;
+   d-cache-size = <8192>;
+   i-cache-size = <8192>;
+   timebase-frequency = <0>;   /* Filled in by u-boot 
*/
+   bus-frequency = <0>;/* Filled in by u-boot 
*/
+   clock-frequency = <0>;  /* Filled in by u-boot 
*/
+   interrupts = <15 2>;/* decrementer 
interrupt */
+   interrupt-parent = <&PIC>;
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = < 0x400>;  /* Filled in by u-boot */
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc852-localbus", "fsl,pq1-localbus", 
"simple-bus";
+   #address-cells = <2>;
+   #size-cells = <1>;
+   reg = <0xfff00100 0x40>;
+
+   ranges = <0 0 0xf000 0x0100>;  /* Filled in by u-boot */
+
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <0 0 0x100>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   bank-width = <1>;
+   device-width = <1>;
+   [EMAIL PROTECTED] {
+   label = "u-boot";
+   reg = <0 0x8>;
+   };
+   [EMAIL PROTECTED] {
+   label = "env";
+   reg = <0x8 0x2>;
+   };
+   [EMAIL PROTECTED] {
+   label = "kernel";
+   reg = <0xa 0x1e>;
+   };
+   [EMAIL PROTECTED] {
+   label = "dtb";
+   reg = <0x28 0x2>;
+   };
+   [EMAIL PROTECTED] {
+   label = "root";
+   reg = <0x2a 0x50>;
+   };
+   [EMAIL PROTECTED] {
+   label = "user";
+   reg = <0x7a 0x86>;
+   };
+   };
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc852", "fsl,pq1-soc", "simple-bus";
+   #address-cells = <1>;
+   #size-cells = <1>;
+   device_type = "soc";
+   ranges = <0 0xfff0 0x4000>;
+
+   PIC: [EMAIL PROTECTED] {
+   interrupt-controller;
+   #interrupt-cells = <2&

Re: [PATCH] [82xx] powerpc: Add support for mpc8247 based board MGCOGE from keymile.

2008-06-13 Thread Heiko Schocher
Hello Scott,

here comes the updated version for the mgcoge port, with your
suggestions:

[powerpc] Added support for the MPC8247 based board MGCOGE
from Keymile.

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/dts/mgcoge.dts  |  174 +++
 arch/powerpc/configs/mgcoge_defconfig |  900 +
 arch/powerpc/platforms/82xx/Kconfig   |8 +
 arch/powerpc/platforms/82xx/Makefile  |1 +
 arch/powerpc/platforms/82xx/mgcoge.c  |  130 +
 5 files changed, 1213 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mgcoge.dts
 create mode 100644 arch/powerpc/configs/mgcoge_defconfig
 create mode 100644 arch/powerpc/platforms/82xx/mgcoge.c

diff --git a/arch/powerpc/boot/dts/mgcoge.dts b/arch/powerpc/boot/dts/mgcoge.dts
new file mode 100644
index 000..54d49c5
--- /dev/null
+++ b/arch/powerpc/boot/dts/mgcoge.dts
@@ -0,0 +1,174 @@
+/*
+ * Device Tree for the MGCOGE plattform from keymile
+ *
+ * Copyright 2008 DENX Software Engineering GmbH
+ * Heiko Schocher <[EMAIL PROTECTED]>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+/ {
+   model = "MGCOGE";
+   compatible = "keymile,mgcoge";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   aliases {
+   ethernet0 = ð0;
+   serial0 = &smc2;
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,[EMAIL PROTECTED] {
+   device_type = "cpu";
+   reg = <0>;
+   d-cache-line-size = <32>;
+   i-cache-line-size = <32>;
+   d-cache-size = <16384>;
+   i-cache-size = <16384>;
+   timebase-frequency = <0>; /* Filled in by U-Boot */
+   clock-frequency = <0>; /* Filled in by U-Boot */
+   bus-frequency = <0>; /* Filled in by U-Boot */
+   };
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc8247-localbus",
+"fsl,pq2-localbus",
+"simple-bus";
+   #address-cells = <2>;
+   #size-cells = <1>;
+   reg = <0xf0010100 0x40>;
+
+   ranges = <0 0 0xfe00 0x0040
+ 1 0 0x5000 0x2000
+   >; /* Filled in by U-Boot */
+
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <0 0x0 0x40>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   bank-width = <1>;
+   device-width = <1>;
+   [EMAIL PROTECTED] {
+   label = "u-boot";
+   reg = <0 0x4>;
+   };
+   [EMAIL PROTECTED] {
+   label = "env";
+   reg = <0x4 0x2>;
+   };
+   [EMAIL PROTECTED] {
+   label = "kernel";
+   reg = <0x6 0x22>;
+   };
+   [EMAIL PROTECTED] {
+   label = "dtb";
+   reg = <0x28 0x2>;
+   };
+   };
+
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <1 0x0 0x200>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   bank-width = <2>;
+   device-width = <2>;
+   [EMAIL PROTECTED] {
+   label = "ramdisk";
+   reg = <0 0x7a>;
+   };
+   [EMAIL PROTECTED] {
+   label = "user";
+   reg = <0x7a 0x186>;
+   };
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0 0>; /* Filled in by U-Boot */
+   };
+
+   [EMAIL PROTECTED] {
+   #address-cells 

Re: [PATCH] [8xx] powerpc: Add support for the MPC852 based mgsuvd board from keymile.

2008-06-13 Thread Heiko Schocher
Hello Scott,

here comes the updated version for the mgsuvd port with your
suggested changes:

[powerpc] add support for the MPC852 based mgsuvd board from
keymile to arch/powerpc. Supported SMC1 (serial console),
SCC3 Ethernet (10Mbps hdx).

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/dts/mgsuvd.dts  |  163 ++
 arch/powerpc/configs/mgsuvd_defconfig |  872 +
 arch/powerpc/platforms/8xx/Kconfig|6 +
 arch/powerpc/platforms/8xx/Makefile   |1 +
 arch/powerpc/platforms/8xx/mgsuvd.c   |   93 
 5 files changed, 1135 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mgsuvd.dts
 create mode 100644 arch/powerpc/configs/mgsuvd_defconfig
 create mode 100644 arch/powerpc/platforms/8xx/mgsuvd.c

diff --git a/arch/powerpc/boot/dts/mgsuvd.dts b/arch/powerpc/boot/dts/mgsuvd.dts
new file mode 100644
index 000..4b05346
--- /dev/null
+++ b/arch/powerpc/boot/dts/mgsuvd.dts
@@ -0,0 +1,163 @@
+/*
+ * MGSUVD Device Tree Source
+ *
+ * Copyright 2008 DENX Software Engineering GmbH
+ * Heiko Schocher <[EMAIL PROTECTED]>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+/ {
+   model = "MGSUVD";
+   compatible = "keymile,mgsuvd";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,[EMAIL PROTECTED] {
+   device_type = "cpu";
+   reg = <0>;
+   d-cache-line-size = <16>;
+   i-cache-line-size = <16>;
+   d-cache-size = <8192>;
+   i-cache-size = <8192>;
+   timebase-frequency = <0>;   /* Filled in by u-boot 
*/
+   bus-frequency = <0>;/* Filled in by u-boot 
*/
+   clock-frequency = <0>;  /* Filled in by u-boot 
*/
+   interrupts = <15 2>;/* decrementer 
interrupt */
+   interrupt-parent = <&PIC>;
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = < 0x400>;  /* Filled in by u-boot */
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,pq1-localbus";
+   #address-cells = <2>;
+   #size-cells = <1>;
+   reg = <0xfff00100 0x40>;
+
+   ranges = <0 0 0xf000 0x0100>;  /* Filled in by u-boot */
+
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <0 0 0x100>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   bank-width = <1>;
+   device-width = <1>;
+   [EMAIL PROTECTED] {
+   label = "u-boot";
+   reg = <0 0x8>;
+   };
+   [EMAIL PROTECTED] {
+   label = "env";
+   reg = <0x8 0x2>;
+   };
+   [EMAIL PROTECTED] {
+   label = "kernel";
+   reg = <0xa 0x1e>;
+   };
+   [EMAIL PROTECTED] {
+   label = "dtb";
+   reg = <0x28 0x2>;
+   };
+   [EMAIL PROTECTED] {
+   label = "root";
+   reg = <0x2a 0x50>;
+   };
+   [EMAIL PROTECTED] {
+   label = "user";
+   reg = <0x7a 0x86>;
+   };
+   };
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc852", "simple-bus", "fsl,pq1-soc";
+   #address-cells = <1>;
+   #size-cells = <1>;
+   device_type = "soc";
+   ranges = <0 0xfff0 0x4000>;
+
+   PIC: [EMAIL PROTECTED] {
+   interrupt-controller;
+   #interrupt-cells = <2>;
+  

Re: [PATCH v2] 8xx: Add support for the MPC852 based board from keymile.

2008-03-18 Thread Heiko Schocher
Hello Vitaly,

Vitaly Bordug wrote:
> On Tue, 18 Mar 2008 09:04:14 +0100
> Heiko Schocher wrote:
[...]
>> OK. Another thought about this. Shouldnt this table go in the dts?
>> A device node like
>>
>> cpm_pin {
>>  pins = ;
>> };
>>
>> would be nice, or?
>>
> This has been a disputable question some time ago, and decided (or it looks 
> like decided) that devtree describes hardware, and not the way it is 
> configured at the moment. Therefor, best way for pin stuff is considered, as 
> Scott mentioned, to set up stuff inside the firmware.

OK, I dont want to start a new discusion about that, but I always thought
(maybe learned, not sure anymore ;-) Linux should be as much independent
as possible from the bootloader(=firmware). If the firmware doesnt make
things right Linux maybe hang ... :-(

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH v3] 8xx: Add support for the MPC852 based board from keymile.

2008-03-18 Thread Heiko Schocher
Hello,

Add support for the MPC852 based mgsuvd board from keymile
to arch/powerpc. Supported SMC1 (serial console),
SCC3 Ethernet (10Mbps hdx)

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/dts/mgsuvd.dts  |  158 +++
 arch/powerpc/configs/mgsuvd_defconfig |  827 +
 arch/powerpc/platforms/8xx/Kconfig|7 +
 arch/powerpc/platforms/8xx/Makefile   |1 +
 arch/powerpc/platforms/8xx/mgsuvd.c   |   97 
 5 files changed, 1090 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mgsuvd.dts
 create mode 100644 arch/powerpc/configs/mgsuvd_defconfig
 create mode 100644 arch/powerpc/platforms/8xx/mgsuvd.c

diff --git a/arch/powerpc/boot/dts/mgsuvd.dts b/arch/powerpc/boot/dts/mgsuvd.dts
new file mode 100644
index 000..eb6ad3b
--- /dev/null
+++ b/arch/powerpc/boot/dts/mgsuvd.dts
@@ -0,0 +1,158 @@
+/*
+ * MGSUVD Device Tree Source
+ *
+ * Copyright 2008 DENX Software Engineering GmbH
+ * Heiko Schocher <[EMAIL PROTECTED]>
+ *
+ * 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.
+ */
+
+
+/ {
+   model = "MGSUVD";
+   compatible = "keymile,mgsuvd";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,[EMAIL PROTECTED] {
+   device_type = "cpu";
+   reg = <0>;
+   d-cache-line-size = ;
+   i-cache-line-size = ;
+   d-cache-size = ;
+   i-cache-size = ;
+   timebase-frequency = <0>;   /* Filled in by u-boot 
*/
+   bus-frequency = <0>;/* Filled in by u-boot 
*/
+   clock-frequency = <0>;  /* Filled in by u-boot 
*/
+   interrupts = ; /* decrementer 
interrupt */
+   interrupt-parent = <&PIC>;
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = < 400>;  /* Filled in by u-boot */
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,pq1-localbus";
+   #address-cells = <2>;
+   #size-cells = <1>;
+   reg = ;
+
+   ranges = <
+   0 0 f000 0100
+   >;  /* Filled in by u-boot */
+
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <0 0 100>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   bank-width = <1>;
+   device-width = <1>;
+   [EMAIL PROTECTED] {
+   label = "u-boot";
+   reg = <0 8>;
+   };
+   [EMAIL PROTECTED] {
+   label = "env";
+   reg = <8 2>;
+   };
+   [EMAIL PROTECTED] {
+   label = "user";
+   reg = ;
+   };
+   };
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc885", "fsl,pq1-soc";
+   #address-cells = <1>;
+   #size-cells = <1>;
+   device_type = "soc";
+   ranges = <0 fff0 4000>;
+
+   PIC: [EMAIL PROTECTED] {
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   reg = <0 24>;
+   compatible = "fsl,pq1-pic";
+   };
+
+   [EMAIL PROTECTED] {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "fsl,cpm1";
+   command-proc = <9c0>;
+   interrupts = <0>;   /* cpm error interrupt */
+   interrupt-parent = <&CPM_PIC>;
+   reg = <9c0 10>;
+   ranges;
+
+   [EMAIL PROTECTED] {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   ranges = <0 2000 2

Re: [PATCH v2] 8xx: Add support for the MPC852 based board from keymile.

2008-03-18 Thread Heiko Schocher
Hello Stephen,

Stephen Rothwell wrote:
> On Tue, 18 Mar 2008 08:13:06 +0100 Heiko Schocher <[EMAIL PROTECTED]> wrote:
>> Stephen Rothwell wrote:
>>> On Fri, 14 Mar 2008 10:24:30 +0100 Heiko Schocher <[EMAIL PROTECTED]> wrote:
>> [...]
>>>> +struct cpm_pin {
>>>> +  int port, pin, flags;
>>>> +};
>>> I wish someone would consolidate all these definitions of cpm_pin.
>> Hmm... do you mean something like, moving this struct
>> in cpm1.h and ...
> 
> Yes or somewhere else appropriate.
> 
>>>> +  for (i = 0; i < ARRAY_SIZE(mgsuvd_pins); i++) {
>>>> +  struct cpm_pin *pin = &mgsuvd_pins[i];
>>>> +  cpm1_set_pin(pin->port, pin->pin, pin->flags);
>>>> +  }
>>> And the code that uses them ...
>> making in arch/powerpc/sysdev/cpm1.c a function
>> cpm1_setup_pins (struct cpm_pin *pins) ?
> 
> Yes.
> 
> This is not necessary for your patch, but would be a nice cleanup later.
> N.B. this struct is alos used by users of cpm2_set_pin().

OK. Another thought about this. Shouldnt this table go in the dts?
A device node like

cpm_pin {
pins = ;
};

would be nice, or?

bye,
Heiko

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH v2] 8xx: Add support for the MPC852 based board from keymile.

2008-03-18 Thread Heiko Schocher
Hello Stephen,

Stephen Rothwell wrote:
> On Fri, 14 Mar 2008 10:24:30 +0100 Heiko Schocher <[EMAIL PROTECTED]> wrote:
[...]
>> +struct cpm_pin {
>> +int port, pin, flags;
>> +};
> 
> I wish someone would consolidate all these definitions of cpm_pin.

Hmm... do you mean something like, moving this struct
in cpm1.h and ...

>> +static void __init init_ioports(void)
>> +{
>> +int i;
>> +
>> +for (i = 0; i < ARRAY_SIZE(mgsuvd_pins); i++) {
>> +struct cpm_pin *pin = &mgsuvd_pins[i];
>> +cpm1_set_pin(pin->port, pin->pin, pin->flags);
>> +}
> 
> And the code that uses them ...

making in arch/powerpc/sysdev/cpm1.c a function
cpm1_setup_pins (struct cpm_pin *pins) ?

>> +static void __init mgsuvd_setup_arch(void)
>> +{
>> +struct device_node *cpu;
>> +
>> +cpu = of_find_node_by_type(NULL, "cpu");
>> +if (cpu != 0) {
> 
> "cpu" is a pointer, so "cpu != NULL" or just "cpu"
> 
>> +const unsigned int *fp;
>> +
>> +fp = of_get_property(cpu, "clock-frequency", NULL);
>> +if (fp != 0)
> 
> Ditto for "fp" test

Its no longer necessary, thanks to Scott

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH v2] 8xx: Add support for the MPC852 based board from keymile.

2008-03-14 Thread Heiko Schocher
Hello,

This add support of the mgsuvd board from keymile to
arch/powerpc. Supported SMC1 (serial console),
SCC3 Ethernet (10Mbps hdx)

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/dts/mgsuvd.dts  |  158 +++
 arch/powerpc/configs/mgsuvd_defconfig |  827 +
 arch/powerpc/platforms/8xx/Kconfig|7 +
 arch/powerpc/platforms/8xx/Makefile   |1 +
 arch/powerpc/platforms/8xx/mgsuvd.c   |  135 ++
 5 files changed, 1128 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mgsuvd.dts
 create mode 100644 arch/powerpc/configs/mgsuvd_defconfig
 create mode 100644 arch/powerpc/platforms/8xx/mgsuvd.c

diff --git a/arch/powerpc/boot/dts/mgsuvd.dts b/arch/powerpc/boot/dts/mgsuvd.dts
new file mode 100644
index 000..eb6ad3b
--- /dev/null
+++ b/arch/powerpc/boot/dts/mgsuvd.dts
@@ -0,0 +1,158 @@
+/*
+ * MGSUVD Device Tree Source
+ *
+ * Copyright 2008 DENX Software Engineering GmbH
+ * Heiko Schocher <[EMAIL PROTECTED]>
+ *
+ * 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.
+ */
+
+
+/ {
+   model = "MGSUVD";
+   compatible = "keymile,mgsuvd";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,[EMAIL PROTECTED] {
+   device_type = "cpu";
+   reg = <0>;
+   d-cache-line-size = ;
+   i-cache-line-size = ;
+   d-cache-size = ;
+   i-cache-size = ;
+   timebase-frequency = <0>;   /* Filled in by u-boot 
*/
+   bus-frequency = <0>;/* Filled in by u-boot 
*/
+   clock-frequency = <0>;  /* Filled in by u-boot 
*/
+   interrupts = ; /* decrementer 
interrupt */
+   interrupt-parent = <&PIC>;
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = < 400>;  /* Filled in by u-boot */
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,pq1-localbus";
+   #address-cells = <2>;
+   #size-cells = <1>;
+   reg = ;
+
+   ranges = <
+   0 0 f000 0100
+   >;  /* Filled in by u-boot */
+
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <0 0 100>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   bank-width = <1>;
+   device-width = <1>;
+   [EMAIL PROTECTED] {
+   label = "u-boot";
+   reg = <0 8>;
+   };
+   [EMAIL PROTECTED] {
+   label = "env";
+   reg = <8 2>;
+   };
+   [EMAIL PROTECTED] {
+   label = "user";
+   reg = ;
+   };
+   };
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc885", "fsl,pq1-soc";
+   #address-cells = <1>;
+   #size-cells = <1>;
+   device_type = "soc";
+   ranges = <0 fff0 4000>;
+
+   PIC: [EMAIL PROTECTED] {
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   reg = <0 24>;
+   compatible = "fsl,pq1-pic";
+   };
+
+   [EMAIL PROTECTED] {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "fsl,cpm1";
+   command-proc = <9c0>;
+   interrupts = <0>;   /* cpm error interrupt */
+   interrupt-parent = <&CPM_PIC>;
+   reg = <9c0 10>;
+   ranges;
+
+   [EMAIL PROTECTED] {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   ranges = <0 2000 2

Re: [Patch] 8xx: MGSUVD support

2008-03-09 Thread Heiko Schocher
Hello Stephen,

Stephen Rothwell wrote:
> On Sun, 09 Mar 2008 10:56:29 +0100 Heiko Schocher <[EMAIL PROTECTED]> wrote:
>> +++ b/arch/powerpc/platforms/8xx/mgsuvd.c
>>
>> +#include 
> 
> You should include linux/of_platform.h (not asm/)

Ok.

>> +static struct cpm_pin mgsuvd_pins[] = {
> 
> Make this __initdata, please.

Argh... forgot this.

[...]
>> +static struct of_device_id __initdata of_bus_ids[] = {
> 
> Make this __initdata, please.

Hmm.. it is __initdata, or? But I fix it to:

static  __initdata struct of_device_id of_bus_ids[]

>> +static int __init declare_of_platform_devices(void)
>> +{
>> +if (!machine_is(mgsuvd))
>> +return 0;
>> +
>> +of_platform_bus_probe(NULL, of_bus_ids, NULL);
>> +
>> +return 0;
>> +}
>> +device_initcall(declare_of_platform_devices);
> 
> This should be "machine_device_initcall(mgsuvd,
> declare_of_platform_devices);" then you don't need the machine_is() check
> above.

Ok

I will send a overworked patch.

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [Patch] 8xx: MGSUVD support

2008-03-09 Thread Heiko Schocher
Hello Vitaly,

Vitaly Bordug wrote:
> Heiko Schocher wrote:
>> the following patch adds support for the MPC852 based mgsuvd board
>> from keymile.
> Looks good overall. Please add supported/working/not working etc SoC devices 
> state along with the patch 
> description. Also a few really small comments below...

OK.

>> Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
>> ---
[...]
>> +
>> +PowerPC,[EMAIL PROTECTED] {
> But it's mpc852, isn't it?

Yes your are right.

>> +device_type = "cpu";
>> +reg = <0>;
>> +d-cache-line-size = ;
>> +i-cache-line-size = ;
>> +d-cache-size = ;
>> +i-cache-size = ;
>> +timebase-frequency = <0>;  /* Filled in by
>> u-boot */
>> +bus-frequency = <0>;  /* Filled in by u-boot
>> */
>> +clock-frequency = <0>; /* Filled in by
>> u-boot */
>> +interrupts = ; // decrementer
>> interrupt
> I would like all the comments to be consistent C style (because that's it for 
> the most other dts'es).

Okay, I fix this, and send a new patch.

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[Patch] 8xx: MGSUVD support

2008-03-09 Thread Heiko Schocher
Hello,

the following patch adds support for the MPC852 based mgsuvd board
from keymile.

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/dts/mgsuvd.dts  |  158 +++
 arch/powerpc/configs/mgsuvd_defconfig |  827 +
 arch/powerpc/platforms/8xx/Kconfig|7 +
 arch/powerpc/platforms/8xx/Makefile   |1 +
 arch/powerpc/platforms/8xx/mgsuvd.c   |  138 ++
 5 files changed, 1131 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mgsuvd.dts
 create mode 100644 arch/powerpc/configs/mgsuvd_defconfig
 create mode 100644 arch/powerpc/platforms/8xx/mgsuvd.c

diff --git a/arch/powerpc/boot/dts/mgsuvd.dts b/arch/powerpc/boot/dts/mgsuvd.dts
new file mode 100644
index 000..629cb6d
--- /dev/null
+++ b/arch/powerpc/boot/dts/mgsuvd.dts
@@ -0,0 +1,158 @@
+/*
+ * MGSUVD Device Tree Source
+ *
+ * Copyright 2008 DENX Software Engineering GmbH
+ * Heiko Schocher <[EMAIL PROTECTED]>
+ *
+ * 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.
+ */
+
+
+/ {
+   model = "MGSUVD";
+   compatible = "keymile,mgsuvd";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,[EMAIL PROTECTED] {
+   device_type = "cpu";
+   reg = <0>;
+   d-cache-line-size = ;
+   i-cache-line-size = ;
+   d-cache-size = ;
+   i-cache-size = ;
+   timebase-frequency = <0>;  /* Filled in by u-boot */
+   bus-frequency = <0>;  /* Filled in by u-boot */
+   clock-frequency = <0>; /* Filled in by u-boot */
+   interrupts = ; // decrementer interrupt
+   interrupt-parent = <&PIC>;
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = < 400>;  /* Filled in by u-boot */
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,pq1-localbus";
+   #address-cells = <2>;
+   #size-cells = <1>;
+   reg = ;
+
+   ranges = <
+   0 0 f000 0100
+   >;  /* Filled in by u-boot */
+
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <0 0 100>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   bank-width = <1>;
+   device-width = <1>;
+   [EMAIL PROTECTED] {
+   label = "u-boot";
+   reg = <0 8>;
+   };
+   [EMAIL PROTECTED] {
+   label = "env";
+   reg = <8 2>;
+   };
+   [EMAIL PROTECTED] {
+   label = "user";
+   reg = ;
+   };
+   };
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc885", "fsl,pq1-soc";
+   #address-cells = <1>;
+   #size-cells = <1>;
+   device_type = "soc";
+   ranges = <0 fff0 4000>;
+
+   PIC: [EMAIL PROTECTED] {
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   reg = <0 24>;
+   compatible = "fsl,pq1-pic";
+   };
+
+   [EMAIL PROTECTED] {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "fsl,cpm1";
+   command-proc = <9c0>;
+   interrupts = <0>;   // cpm error interrupt
+   interrupt-parent = <&CPM_PIC>;
+   reg = <9c0 10>;
+   ranges;
+
+   [EMAIL PROTECTED] {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   ranges = <0 2000 2000>;
+
+   [EMAIL PROTECTED] {
+   compatible

[PATCH v3] 82xx: MGCOGE support

2008-03-09 Thread Heiko Schocher
Hello,

following Patch adds support for the MPC8247 based mgcoge
board from keymile.

changes since v2 Patch:

- added JFFS2 support
- added support for the second Flash on the board.

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/dts/mgcoge.dts  |  165 +++
 arch/powerpc/configs/mgcoge_defconfig |  854 +
 arch/powerpc/platforms/82xx/Kconfig   |9 +
 arch/powerpc/platforms/82xx/Makefile  |1 +
 arch/powerpc/platforms/82xx/mgcoge.c  |  130 +
 5 files changed, 1159 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mgcoge.dts
 create mode 100644 arch/powerpc/configs/mgcoge_defconfig
 create mode 100644 arch/powerpc/platforms/82xx/mgcoge.c

diff --git a/arch/powerpc/boot/dts/mgcoge.dts b/arch/powerpc/boot/dts/mgcoge.dts
new file mode 100644
index 000..fa6f933
--- /dev/null
+++ b/arch/powerpc/boot/dts/mgcoge.dts
@@ -0,0 +1,165 @@
+/*
+ * Device Tree for the MGCOGE plattform from keymile
+ *
+ * Copyright 2008 DENX Software Engineering GmbH
+ * Heiko Schocher <[EMAIL PROTECTED]>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+/ {
+   model = "MGCOGE";
+   compatible = "keymile,mgcoge";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   aliases {
+   ethernet0 = ð0;
+   serial0 = &smc2;
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,[EMAIL PROTECTED] {
+   device_type = "cpu";
+   reg = <0>;
+   d-cache-line-size = <32>;
+   i-cache-line-size = <32>;
+   d-cache-size = <16384>;
+   i-cache-size = <16384>;
+   timebase-frequency = <0>; /* Filled in by U-Boot */
+   clock-frequency = <0>; /* Filled in by U-Boot */
+   bus-frequency = <0>; /* Filled in by U-Boot */
+   };
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc8247-localbus",
+"fsl,pq2-localbus",
+"simple-bus";
+   #address-cells = <2>;
+   #size-cells = <1>;
+   reg = <0xf0010100 0x40>;
+
+   ranges = <0 0 0xfe00 0x0040
+ 1 0 0x5000 0x2000
+   >; /* Filled in by U-Boot */
+
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <0 0x0 0x40>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   bank-width = <1>;
+   device-width = <1>;
+   [EMAIL PROTECTED] {
+   label = "u-boot";
+   reg = <0 0x4>;
+   };
+   [EMAIL PROTECTED] {
+   label = "env";
+   reg = <0x4 0x2>;
+   };
+   [EMAIL PROTECTED] {
+   label = "user";
+   reg = <0x6 0x3a>;
+   };
+   };
+
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <1 0x0 0x200>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   bank-width = <2>;
+   device-width = <2>;
+   [EMAIL PROTECTED] {
+   label = "cfg";
+   reg = <0 0x200>;
+   };
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0 0>; /* Filled in by U-Boot */
+   };
+
+   [EMAIL PROTECTED] {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "fsl,mpc8247-immr", "fsl,pq2-soc", "simple-bus";
+   ranges = <0x 0xf000 0x00053000>;
+
+   // Temporary until code stops depending on it.
+   device_type = "soc";
+
+   [EMAIL PROTECTED] {
+

Re: [PATCH v2] 82xx: MGCOGE support

2008-03-07 Thread Heiko Schocher
Hello Scott,

Scott Wood wrote:
> Heiko Schocher wrote:
>> The following patch adds support for the mpc8247 based
>> board MGCOGE from keymile.
>>
>> changes to the previous patchset:
>>
>> - Added the suggestions from Scott Wood:
>>   http://ozlabs.org/pipermail/linuxppc-dev/2008-January/050957.html
>>
>> - The patch
>> http://ozlabs.org/pipermail/linuxppc-dev/2008-January/050931.html
>>   is no longer needed.
>>
>> Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
> 
> Acked-by: Scott Wood <[EMAIL PROTECTED]>

I have some changes for this Hardware (a second Flash is now there),
how should I post this change?

a) The complete board support again, with the new Flash.
b) as an incremental Patch against the patch I postet in this Thread.

(I vote for option a, and we throw away the "v2 Patch")

thanks for helping

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH v2] 82xx: MGCOGE support

2008-01-30 Thread Heiko Schocher
Hello,

The following patch adds support for the mpc8247 based
board MGCOGE from keymile.

changes to the previous patchset:

- Added the suggestions from Scott Wood:
  http://ozlabs.org/pipermail/linuxppc-dev/2008-January/050957.html

- The patch http://ozlabs.org/pipermail/linuxppc-dev/2008-January/050931.html
  is no longer needed.

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/dts/mgcoge.dts  |  149 ++
 arch/powerpc/configs/mgcoge_defconfig |  821 +
 arch/powerpc/platforms/82xx/Kconfig   |9 +
 arch/powerpc/platforms/82xx/Makefile  |1 +
 arch/powerpc/platforms/82xx/mgcoge.c  |  130 ++
 5 files changed, 1110 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mgcoge.dts
 create mode 100644 arch/powerpc/configs/mgcoge_defconfig
 create mode 100644 arch/powerpc/platforms/82xx/mgcoge.c

diff --git a/arch/powerpc/boot/dts/mgcoge.dts b/arch/powerpc/boot/dts/mgcoge.dts
new file mode 100644
index 000..63f7cfe
--- /dev/null
+++ b/arch/powerpc/boot/dts/mgcoge.dts
@@ -0,0 +1,149 @@
+/*
+ * Device Tree for the MGCOGE plattform from keymile
+ *
+ * Copyright 2008 DENX Software Engineering GmbH
+ *
+ * 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.
+ */
+
+/dts-v1/;
+/ {
+   model = "MGCOGE";
+   compatible = "keymile,mgcoge";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   aliases {
+   ethernet0 = ð0;
+   serial0 = &smc2;
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,[EMAIL PROTECTED] {
+   device_type = "cpu";
+   reg = <0>;
+   d-cache-line-size = <32>;
+   i-cache-line-size = <32>;
+   d-cache-size = <16384>;
+   i-cache-size = <16384>;
+   timebase-frequency = <0>;
+   clock-frequency = <0>;
+   bus-frequency = <0>;
+   };
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc8247-localbus",
+"fsl,pq2-localbus",
+"simple-bus";
+   #address-cells = <2>;
+   #size-cells = <1>;
+   reg = <0xf0010100 0x40>;
+
+   ranges = <0 0 0xfe00 0x0040>;
+
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <0 0x0 0x40>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   bank-width = <1>;
+   device-width = <1>;
+   [EMAIL PROTECTED] {
+   label = "u-boot";
+   reg = <0 0x4>;
+   };
+   [EMAIL PROTECTED] {
+   label = "env";
+   reg = <0x4 0x2>;
+   };
+   [EMAIL PROTECTED] {
+   label = "user";
+   reg = <0x6 0x3a>;
+   };
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0 0>;
+   };
+
+   [EMAIL PROTECTED] {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "fsl,mpc8247-immr", "fsl,pq2-soc", "simple-bus";
+   ranges = <0x 0xf000 0x00053000>;
+
+   // Temporary until code stops depending on it.
+   device_type = "soc";
+
+   [EMAIL PROTECTED] {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   #interrupt-cells = <2>;
+   compatible = "fsl,mpc8247-cpm", "fsl,cpm2",
+   "simple-bus";
+   reg = <0x119c0 0x30>;
+   ranges;
+
+   muram {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   ranges = <0 0 0x1>;
+
+  

[PATCH 4/4] 82xx: MGCOGE support

2008-01-29 Thread Heiko Schocher
Hello,

To get the serial console on the SMC2 working, the
following patch is needed:

Fixing serial console on a SMC on MPC82xx based
board and using CONFIG_PPC_CPM_NEW_BINDING

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 drivers/serial/cpm_uart/cpm_uart_core.c |   15 +++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c 
b/drivers/serial/cpm_uart/cpm_uart_core.c
index b5e4478..7e610c2 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -978,9 +978,24 @@ static int cpm_uart_init_port(struct device_node *np,
pinfo->sccup = pram;
} else if (of_device_is_compatible(np, "fsl,cpm1-smc-uart") ||
   of_device_is_compatible(np, "fsl,cpm2-smc-uart")) {
+   u16 __iomem *pram_base;
+   struct resource res;
+
pinfo->flags |= FLAG_SMC;
pinfo->smcp = mem;
pinfo->smcup = pram;
+
+   if (of_address_to_resource(np, 1, &res)) {
+   ret = -ENOMEM;
+   goto out_pram;
+   }
+   pram_base = of_iomap(np, 2);
+   if (!pram_base) {
+   ret = -ENOMEM;
+   goto out_pram;
+   }
+   *pram_base = res.start;
+   iounmap (pram_base);
} else {
ret = -ENODEV;
goto out_pram;
-- 
1.5.2.2

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH 3/4] 82xx: MGCOGE support

2008-01-29 Thread Heiko Schocher
Hello,

The following Patch adds the DTS File for the MGCOGE
plattform from keymile.

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/dts/mgcoge.dts |  153 ++
 1 files changed, 153 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mgcoge.dts

diff --git a/arch/powerpc/boot/dts/mgcoge.dts b/arch/powerpc/boot/dts/mgcoge.dts
new file mode 100644
index 000..1033e5a
--- /dev/null
+++ b/arch/powerpc/boot/dts/mgcoge.dts
@@ -0,0 +1,153 @@
+/*
+ * Device Tree for the MGCOGE plattform from keymile.
+ *
+ * Copyright 2008 DENX Software Engineering GmbH
+ *
+ * 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.
+ */
+
+/dts-v1/;
+/ {
+   model = "MGCOGE";
+   compatible = "fsl,mgcoge";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   aliases {
+   ethernet0 = ð0;
+   serial0 = &smc2;
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,[EMAIL PROTECTED] {
+   device_type = "cpu";
+   reg = <0>;
+   d-cache-line-size = <32>;
+   i-cache-line-size = <32>;
+   d-cache-size = <16384>;
+   i-cache-size = <16384>;
+   timebase-frequency = <0>;
+   clock-frequency = <0>;
+   bus-frequency = <0>;
+   };
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc8248-localbus",
+"fsl,pq2-localbus",
+"simple-bus";
+   #address-cells = <2>;
+   #size-cells = <1>;
+   reg = <0xf0010100 0x40>;
+
+   ranges = <0 0 0xfe00 0x0040>;
+
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <0 0x0 0x40>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   bank-width = <1>;
+   device-width = <1>;
+   [EMAIL PROTECTED] {
+   label = "u-boot";
+   reg = <0 0x4>;
+   };
+   [EMAIL PROTECTED] {
+   label = "env";
+   reg = <0x4 0x2>;
+   };
+   [EMAIL PROTECTED] {
+   label = "user";
+   reg = <0x6 0x3a>;
+   };
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0 0>;
+   };
+
+   [EMAIL PROTECTED] {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "fsl,mpc8248-immr", "fsl,pq2-soc", "simple-bus";
+   ranges = <0x 0xf000 0x00053000>;
+
+   // Temporary until code stops depending on it.
+   device_type = "soc";
+
+   // Temporary -- will go away once kernel uses ranges for 
get_immrbase().
+   reg = <0xf000 0x00053000>;
+
+   [EMAIL PROTECTED] {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   #interrupt-cells = <2>;
+   compatible = "fsl,mpc8248-cpm", "fsl,cpm2",
+   "simple-bus";
+   reg = <0x119c0 0x30>;
+   ranges;
+
+   muram {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   ranges = <0 0 0x1>;
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,cpm-muram-data";
+   reg = <0 0x1100 0x1140
+  0xec0 0x9800 0x800>;
+   };
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc8248-brg",
+

[PATCH 2/4] 82xx: MGCOGE support

2008-01-29 Thread Heiko Schocher
Hello

The following Patchs adds the defconfig file for the MGCOGE
plattform from keymile.

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 arch/powerpc/configs/mgcoge_defconfig |  749 +
 1 files changed, 749 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/configs/mgcoge_defconfig

diff --git a/arch/powerpc/configs/mgcoge_defconfig 
b/arch/powerpc/configs/mgcoge_defconfig
new file mode 100644
index 000..d964c0d
--- /dev/null
+++ b/arch/powerpc/configs/mgcoge_defconfig
@@ -0,0 +1,749 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Tue Jan 29 08:30:19 2008
+#
+# CONFIG_PPC64 is not set
+
+#
+# Processor support
+#
+CONFIG_6xx=y
+# CONFIG_PPC_85xx is not set
+# CONFIG_PPC_8xx is not set
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_E200 is not set
+CONFIG_PPC_FPU=y
+CONFIG_PPC_STD_MMU=y
+CONFIG_PPC_STD_MMU_32=y
+# CONFIG_PPC_MM_SLICES is not set
+# CONFIG_SMP is not set
+CONFIG_PPC32=y
+CONFIG_WORD_SIZE=32
+CONFIG_PPC_MERGE=y
+CONFIG_MMU=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_IRQ_PER_CPU=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
+CONFIG_PPC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_GENERIC_NVRAM=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_PPC_OF=y
+CONFIG_OF=y
+# CONFIG_PPC_UDBG_16550 is not set
+# CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+# CONFIG_DEFAULT_UIMAGE is not set
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+# CONFIG_EXPERIMENTAL is not set
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_MODULES is not set
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_IOSCHED_CFQ is not set
+# CONFIG_DEFAULT_AS is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+
+#
+# Platform support
+#
+# CONFIG_PPC_MULTIPLATFORM is not set
+CONFIG_PPC_82xx=y
+# CONFIG_PPC_83xx is not set
+# CONFIG_PPC_86xx is not set
+# CONFIG_PPC_MPC52xx is not set
+# CONFIG_PPC_MPC5200 is not set
+# CONFIG_PPC_CELL is not set
+# CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_MPC8272_ADS is not set
+# CONFIG_PQ2FADS is not set
+# CONFIG_EP8248E is not set
+CONFIG_MGCOGE=y
+# CONFIG_PQ2ADS is not set
+CONFIG_8260=y
+CONFIG_8272=y
+# CONFIG_IPIC is not set
+# CONFIG_MPIC is not set
+# CONFIG_MPIC_WEIRD is not set
+# CONFIG_PPC_I8259 is not set
+# CONFIG_PPC_RTAS is not set
+# CONFIG_MMIO_NVRAM is not set
+# CONFIG_PPC_MPC106 is not set
+# CONFIG_PPC_970_NAP is not set
+# CONFIG_PPC_INDIRECT_IO is not set
+# CONFIG_GENERIC_IOMAP is not set
+# CONFIG_CPU_FREQ is not set
+CONFIG_CPM2=y
+CONFIG_PPC_CPM_NEW_BINDING=y
+# CONFIG_FSL_ULI1575 is not set
+CONFIG_CPM=y
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_MISC=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# C

[PATCH 1/4] 82xx: MGCOGE support

2008-01-29 Thread Heiko Schocher
Hello,

The following Patch adds basic files for supporting the MGCOGE
plattform from keymile.

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/82xx/Kconfig  |9 +++
 arch/powerpc/platforms/82xx/Makefile |1 +
 arch/powerpc/platforms/82xx/mgcoge.c |  130 ++
 3 files changed, 140 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/platforms/82xx/mgcoge.c

diff --git a/arch/powerpc/platforms/82xx/Kconfig 
b/arch/powerpc/platforms/82xx/Kconfig
index 4fad6c7..f2ea477 100644
--- a/arch/powerpc/platforms/82xx/Kconfig
+++ b/arch/powerpc/platforms/82xx/Kconfig
@@ -39,6 +39,15 @@ config EP8248E
  This board is also resold by Freescale as the QUICCStart
  MPC8248 Evaluation System and/or the CWH-PPC-8248N-VE.

+config MGCOGE
+   bool "Keymile MGCOGE"
+   select 8272
+   select 8260
+   select FSL_SOC
+   select PPC_CPM_NEW_BINDING
+   help
+ This enables support for the Keymile MGCOGE board.
+
 endchoice

 config PQ2ADS
diff --git a/arch/powerpc/platforms/82xx/Makefile 
b/arch/powerpc/platforms/82xx/Makefile
index 6cd5cd5..d982793 100644
--- a/arch/powerpc/platforms/82xx/Makefile
+++ b/arch/powerpc/platforms/82xx/Makefile
@@ -6,3 +6,4 @@ obj-$(CONFIG_CPM2) += pq2.o
 obj-$(CONFIG_PQ2_ADS_PCI_PIC) += pq2ads-pci-pic.o
 obj-$(CONFIG_PQ2FADS) += pq2fads.o
 obj-$(CONFIG_EP8248E) += ep8248e.o
+obj-$(CONFIG_MGCOGE) += mgcoge.o
diff --git a/arch/powerpc/platforms/82xx/mgcoge.c 
b/arch/powerpc/platforms/82xx/mgcoge.c
new file mode 100644
index 000..a8f2956
--- /dev/null
+++ b/arch/powerpc/platforms/82xx/mgcoge.c
@@ -0,0 +1,130 @@
+/*
+ * Keymile mgcoge support
+ * Copyright 2008 DENX Software Engineering GmbH
+ * Author: Heiko Schocher <[EMAIL PROTECTED]>
+ *
+ * based on code from:
+ * Copyright 2007 Freescale Semiconductor, Inc.
+ * Author: Scott Wood <[EMAIL PROTECTED]>
+ *
+ * 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 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include "pq2.h"
+
+static void __init mgcoge_pic_init(void)
+{
+   struct device_node *np = of_find_compatible_node(NULL, NULL, 
"fsl,pq2-pic");
+   if (!np) {
+   printk(KERN_ERR "PIC init: can not find cpm-pic node\n");
+   return;
+   }
+
+   cpm2_pic_init(np);
+   of_node_put(np);
+}
+
+struct cpm_pin {
+   int port, pin, flags;
+};
+
+static __initdata struct cpm_pin mgcoge_pins[] = {
+
+   /* SMC2 */
+   {1, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+   {1, 9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+
+   /* SCC4 */
+   {3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+   {3, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+   {3,  9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+   {3,  8, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+   {4, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+   {4, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+   {4, 22, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+};
+
+static void __init init_ioports(void)
+{
+   int i;
+
+   for (i = 0; i < ARRAY_SIZE(mgcoge_pins); i++) {
+   const struct cpm_pin *pin = &mgcoge_pins[i];
+   cpm2_set_pin(pin->port, pin->pin, pin->flags);
+   }
+
+   cpm2_smc_clk_setup(CPM_CLK_SMC2, CPM_BRG8);
+   cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK7, CPM_CLK_RX);
+   cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK8, CPM_CLK_TX);
+}
+
+static void __init mgcoge_setup_arch(void)
+{
+   if (ppc_md.progress)
+   ppc_md.progress("mgcoge_setup_arch()", 0);
+
+   cpm2_reset();
+
+   /* When this is set, snooping CPM DMA from RAM causes
+* machine checks.  See erratum SIU18.
+*/
+   clrbits32(&cpm2_immr->im_siu_conf.siu_82xx.sc_bcr, MPC82XX_BCR_PLDP);
+
+   init_ioports();
+
+   if (ppc_md.progress)
+   ppc_md.progress("mgcoge_setup_arch(), finish", 0);
+}
+
+static  __initdata struct of_device_id of_bus_ids[] = {
+   { .compatible = "simple-bus", },
+   {},
+};
+
+static int __init declare_of_platform_devices(void)
+{
+   of_platform_bus_probe(NULL, of_bus_ids, NULL);
+
+   return 0;
+}
+machine_device_initcall(mgcoge, declare_of_platform_devices);
+
+/*
+ * Called very early, device-tree isn't unflattened
+ */
+static int __init mgcoge_probe(void)
+{
+   unsigned long root = of_get_flat_dt_root();
+   return of_flat_dt_is_compatible(root, "fsl,mgcoge");
+}
+
+define_machine(mgcoge)
+{
+   .name = "Keymile MGCOGE",
+   .probe = mgcoge_probe,
+   .setup_arch = m

[PATCH 0/3] 82xx: MGCOGE support

2008-01-29 Thread Heiko Schocher
Hello,

the following 4 patches adding support for the MPC8247
based board MGCOGE from keymile.

The following Patch posted on this list is also needed,
to get the Ethernet over SCC running.

http://ozlabs.org/pipermail/linuxppc-dev/2008-January/049681.html

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH for 2.6.24][NET] fs_enet: check for phydev existence in the ethtool handlers

2008-01-10 Thread Heiko Schocher
Hello Scott,

Scott Wood wrote:
> Heiko Schocher wrote:
>> diff --git a/drivers/net/fs_enet/fs_enet-main.c
>> b/drivers/net/fs_enet/fs_enet-main.c
>> index f2a4d39..f432a18 100644
>> --- a/drivers/net/fs_enet/fs_enet-main.c
>> +++ b/drivers/net/fs_enet/fs_enet-main.c
>> @@ -810,6 +810,10 @@ static int fs_enet_open(struct net_device *dev)
>>  if (fep->fpi->use_napi)
>>  napi_enable(&fep->napi);
>>
>> +/* to initialize the fep->cur_rx,... */
>> +/* not doing this, will cause a crash in fs_enet_rx_napi */
>> +fs_init_bds(fep->ndev);
> 
> We should do this just before napi_enable() rather than just after, to
> eliminate any chance of a race window.

Yes, you are right.
Here is the new patch:

>From 3b8db4261199f0115d8e0188b6bffbc9f5e7673d Mon Sep 17 00:00:00 2001
From: Heiko Schocher <[EMAIL PROTECTED]>
Date: Thu, 10 Jan 2008 19:28:18 +0100
Subject: [PATCH] [POWERPC] Fix Ethernet over SCC on a CPM2,
  also Fix crash in fs_enet_rx_napi()

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 drivers/net/fs_enet/fs_enet-main.c |   10 +-
 drivers/net/fs_enet/mac-scc.c  |8 +++-
 include/asm-powerpc/cpm2.h |5 +
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/drivers/net/fs_enet/fs_enet-main.c 
b/drivers/net/fs_enet/fs_enet-main.c
index f2a4d39..70a0319 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -807,6 +807,10 @@ static int fs_enet_open(struct net_device *dev)
int r;
int err;

+   /* to initialize the fep->cur_rx,... */
+   /* not doing this, will cause a crash in fs_enet_rx_napi */
+   fs_init_bds(fep->ndev);
+
if (fep->fpi->use_napi)
napi_enable(&fep->napi);

@@ -982,6 +986,7 @@ static struct net_device *fs_init_instance(struct device 
*dev,
fep = netdev_priv(ndev);

fep->dev = dev;
+   fep->ndev = ndev;
dev_set_drvdata(dev, ndev);
fep->fpi = fpi;
if (fpi->init_ioports)
@@ -1085,7 +1090,6 @@ static struct net_device *fs_init_instance(struct device 
*dev,
}
registered = 1;

-
return ndev;

 err:
@@ -1347,6 +1351,10 @@ static struct of_device_id fs_enet_match[] = {
.compatible = "fsl,cpm1-scc-enet",
.data = (void *)&fs_scc_ops,
},
+   {
+   .compatible = "fsl,cpm2-scc-enet",
+   .data = (void *)&fs_scc_ops,
+   },
 #endif
 #ifdef CONFIG_FS_ENET_HAS_FCC
{
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c
index fe3d8a6..3889271 100644
--- a/drivers/net/fs_enet/mac-scc.c
+++ b/drivers/net/fs_enet/mac-scc.c
@@ -50,7 +50,6 @@
 #include "fs_enet.h"

 /*/
-
 #if defined(CONFIG_CPM1)
 /* for a 8xx __raw_xxx's are sufficient */
 #define __fs_out32(addr, x)__raw_writel(x, addr)
@@ -65,6 +64,8 @@
 #define __fs_out16(addr, x)out_be16(addr, x)
 #define __fs_in32(addr)in_be32(addr)
 #define __fs_in16(addr)in_be16(addr)
+#define __fs_out8(addr, x) out_8(addr, x)
+#define __fs_in8(addr) in_8(addr)
 #endif

 /* write, read, set bits, clear bits */
@@ -297,8 +298,13 @@ static void restart(struct net_device *dev)

/* Initialize function code registers for big-endian.
 */
+#ifndef CONFIG_NOT_COHERENT_CACHE
+   W8(ep, sen_genscc.scc_rfcr, SCC_EB | SCC_GBL);
+   W8(ep, sen_genscc.scc_tfcr, SCC_EB | SCC_GBL);
+#else
W8(ep, sen_genscc.scc_rfcr, SCC_EB);
W8(ep, sen_genscc.scc_tfcr, SCC_EB);
+#endif

/* Set maximum bytes per receive buffer.
 * This appears to be an Ethernet frame size, not the buffer
diff --git a/include/asm-powerpc/cpm2.h b/include/asm-powerpc/cpm2.h
index f1112c1..14c6496 100644
--- a/include/asm-powerpc/cpm2.h
+++ b/include/asm-powerpc/cpm2.h
@@ -375,6 +375,11 @@ typedef struct scc_param {
uintscc_tcrc;   /* Internal */
 } sccp_t;

+/* Function code bits.
+*/
+#define SCC_EB ((u_char) 0x10) /* Set big endian byte order */
+#define SCC_GBL((u_char) 0x20) /* Snooping enabled */
+
 /* CPM Ethernet through SCC1.
  */
 typedef struct scc_enet {
-- 
1.5.2.2


bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH for 2.6.24][NET] fs_enet: check for phydev existence in the ethtool handlers

2008-01-10 Thread Heiko Schocher
Hello Scott,

Heiko Schocher wrote:
> Hello Scott,
[...]
> Will resend this fixed patch.

Here it is:

[POWERPC] Fix Ethernet over SCC on a CPM2,
  also Fix crash in fs_enet_rx_napi()

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>

diff --git a/drivers/net/fs_enet/fs_enet-main.c 
b/drivers/net/fs_enet/fs_enet-main.c
index f2a4d39..f432a18 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -810,6 +810,10 @@ static int fs_enet_open(struct net_device *dev)
if (fep->fpi->use_napi)
napi_enable(&fep->napi);

+   /* to initialize the fep->cur_rx,... */
+   /* not doing this, will cause a crash in fs_enet_rx_napi */
+   fs_init_bds(fep->ndev);
+
/* Install our interrupt handler. */
r = fs_request_irq(dev, fep->interrupt, "fs_enet-mac", 
fs_enet_interrupt);
if (r != 0) {
@@ -982,6 +986,7 @@ static struct net_device *fs_init_instance(struct device 
*dev,
fep = netdev_priv(ndev);

fep->dev = dev;
+   fep->ndev = ndev;
dev_set_drvdata(dev, ndev);
fep->fpi = fpi;
if (fpi->init_ioports)
@@ -1085,7 +1090,6 @@ static struct net_device *fs_init_instance(struct device 
*dev,
}
registered = 1;

-
return ndev;

 err:
@@ -1347,6 +1351,10 @@ static struct of_device_id fs_enet_match[] = {
.compatible = "fsl,cpm1-scc-enet",
.data = (void *)&fs_scc_ops,
},
+   {
+   .compatible = "fsl,cpm2-scc-enet",
+   .data = (void *)&fs_scc_ops,
+   },
 #endif
 #ifdef CONFIG_FS_ENET_HAS_FCC
{
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c
index fe3d8a6..3889271 100644
--- a/drivers/net/fs_enet/mac-scc.c
+++ b/drivers/net/fs_enet/mac-scc.c
@@ -50,7 +50,6 @@
 #include "fs_enet.h"

 /*/
-
 #if defined(CONFIG_CPM1)
 /* for a 8xx __raw_xxx's are sufficient */
 #define __fs_out32(addr, x)__raw_writel(x, addr)
@@ -65,6 +64,8 @@
 #define __fs_out16(addr, x)out_be16(addr, x)
 #define __fs_in32(addr)in_be32(addr)
 #define __fs_in16(addr)in_be16(addr)
+#define __fs_out8(addr, x) out_8(addr, x)
+#define __fs_in8(addr) in_8(addr)
 #endif

 /* write, read, set bits, clear bits */
@@ -297,8 +298,13 @@ static void restart(struct net_device *dev)

/* Initialize function code registers for big-endian.
 */
+#ifndef CONFIG_NOT_COHERENT_CACHE
+   W8(ep, sen_genscc.scc_rfcr, SCC_EB | SCC_GBL);
+   W8(ep, sen_genscc.scc_tfcr, SCC_EB | SCC_GBL);
+#else
W8(ep, sen_genscc.scc_rfcr, SCC_EB);
W8(ep, sen_genscc.scc_tfcr, SCC_EB);
+#endif

/* Set maximum bytes per receive buffer.
 * This appears to be an Ethernet frame size, not the buffer
diff --git a/include/asm-powerpc/cpm2.h b/include/asm-powerpc/cpm2.h
index f1112c1..14c6496 100644
--- a/include/asm-powerpc/cpm2.h
+++ b/include/asm-powerpc/cpm2.h
@@ -375,6 +375,11 @@ typedef struct scc_param {
uintscc_tcrc;   /* Internal */
 } sccp_t;

+/* Function code bits.
+*/
+#define SCC_EB ((u_char) 0x10) /* Set big endian byte order */
+#define SCC_GBL((u_char) 0x20) /* Snooping enabled */
+
 /* CPM Ethernet through SCC1.
  */
 typedef struct scc_enet {

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH for 2.6.24][NET] fs_enet: check for phydev existence in the ethtool handlers

2008-01-10 Thread Heiko Schocher
Hello Scott,

Scott Wood wrote:
> On Wed, Jan 09, 2008 at 01:58:49PM +0100, Heiko Schocher wrote:
>> @@ -1312,6 +1312,9 @@ static int __devinit fs_enet_probe(struct of_device 
>> *ofdev,
>> ndev->dev_addr[0], ndev->dev_addr[1], ndev->dev_addr[2],
>> ndev->dev_addr[3], ndev->dev_addr[4], ndev->dev_addr[5]);
>>
>> +/* to initialize the fep->cur_rx,... */
>> +/* not doing this, will cause a crash in fs_enet_rx_napi */
>> +fs_init_bds(ndev);
>>  return 0;
> 
> We don't want to allocate ring buffers for network interfaces that are never
> opened, especially given the small amount of memory on some boards that use
> this driver.
> 
> Instead, we should probably not be calling napi_enable() until the link is
> up and init_bds() has been called.

Ah, okay. I actually tried calling fs_init_bds(ndev); in fs_enet_open() after
napi_enable, and this also works fine. I think there is the better place for
it. Thanks.

> 
>> @@ -1342,9 +1345,13 @@ static int fs_enet_remove(struct of_device *ofdev)
>>  }
>>
>>  static struct of_device_id fs_enet_match[] = {
>> -#ifdef CONFIG_FS_ENET_HAS_SCC
>> +#if defined(CONFIG_FS_ENET_HAS_SCC)
>>  {
>> +#if defined(CONFIG_CPM1)
>>  .compatible = "fsl,cpm1-scc-enet",
>> +#else
>> +.compatible = "fsl,cpm2-scc-enet",
>> +#endif
> 
> I know there are already ifdefs of this sort, and that multiplatform
> cpm1/cpm2 is very unlikely to ever happen, but can we try to avoid
> introducing more such ifdefs?
> 
> We can have both match entries present at the same time.

OK, fix this.

> 
>>  .data = (void *)&fs_scc_ops,
>>  },
>>  #endif
>> diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c
>> index 48f2f30..3b5ca76 100644
>> --- a/drivers/net/fs_enet/mac-scc.c
>> +++ b/drivers/net/fs_enet/mac-scc.c
>> @@ -50,6 +50,7 @@
>>  #include "fs_enet.h"
>>
>>  /*/
>> +#define SCC_EB ((u_char)0x10)  /* Set big endian byte order */
> 
> This is already defined in asm-powerpc/commproc.h, and thus will cause a
> duplicate definition when building for 8xx.  Please add this definition to
> asm-powerpc/cpm2.h.

OK, will fix it.

> 
>> +#if defined(CONFIG_CPM1)
>>  W16(cpmp, cp_cpcr, fpi->cp_command | CPM_CR_FLG | (op << 8));
>>  for (i = 0; i < MAX_CR_CMD_LOOPS; i++)
>>  if ((R16(cpmp, cp_cpcr) & CPM_CR_FLG) == 0)
>>  return 0;
>> +#else
>> +W32(cpmp, cp_cpcr, fpi->cp_command | CPM_CR_FLG | op);
>> +for (i = 0; i < MAX_CR_CMD_LOOPS; i++)
>> +if ((R32(cpmp, cp_cpcr) & CPM_CR_FLG) == 0)
>> +return 0;
>> +
>> +#endif
> 
> Commit 362f9b6fa8c9670cc5496390845021c2865d049b in Paul's tree makes this
> unnecessary.

Tried this patch, works fine for me :-)

> 
>> @@ -306,8 +317,15 @@ static void restart(struct net_device *dev)
>>
>>  /* Initialize function code registers for big-endian.
>>   */
>> +#ifdef CONFIG_CPM2
>> +/* from oldstyle driver in arch/ppc */
>> +/* seems necessary */
>> +W8(ep, sen_genscc.scc_rfcr, SCC_EB | 0x20);
>> +W8(ep, sen_genscc.scc_tfcr, SCC_EB | 0x20);
>> +#else
>>  W8(ep, sen_genscc.scc_rfcr, SCC_EB);
>>  W8(ep, sen_genscc.scc_tfcr, SCC_EB);
>> +#endif
> 
> Please define 0x20 as SCC_GBL (Snooping Enabled) in cpm2.h, and
> conditionalize this on #ifndef CONFIG_NOT_COHERENT_CACHE.
> 
> You can remove the comment; it's really necessary, not just "seems" so. :-)

OK, fix it.

Will resend this fixed patch.

thanks
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH for 2.6.24][NET] fs_enet: check for phydev existence in the ethtool handlers

2008-01-09 Thread Heiko Schocher
Hello Sergej,

Wed Jan 9 21:46:06 EST 2008 Sergej Stepanov [EMAIL PROTECTED] wrote:
> I got also oops problem with the driver.
> What could be false?
> After the following patch it functions.
> Thanks for any advance.
>
> diff --git a/drivers/net/fs_enet/fs_enet-main.c
> b/drivers/net/fs_enet/fs_enet-main.c
> index f2a4d39..d5081b1 100644
> --- a/drivers/net/fs_enet/fs_enet-main.c
> +++ b/drivers/net/fs_enet/fs_enet-main.c
> @@ -99,6 +99,8 @@ static int fs_enet_rx_napi(struct napi_struct *napi,
> int budget)

seems your mailer wraps long lines

>if (!netif_running(dev))
>return 0;
>
> +   if (fep->cur_rx == NULL)
> +   return 0;
> /*
>  * First, grab all of the stats for the incoming packet.
>  * These get messed up if we get called due to a busy condition.

Hmm... I had also a oops in fs_enet_rx_napi () because of an
uninitialized fep->cur_rx. The following Patch solves this, also
adds support for using Ethernet over SCC on a CPM2.

>From 62cd02d481eb772f4417e9ba17fb010d1954c330 Mon Sep 17 00:00:00 2001
From: Heiko Schocher <[EMAIL PROTECTED]>
Date: Mon, 7 Jan 2008 09:42:09 +0100
Subject: [PATCH] [POWERPC] Fix Ethernet over SCC on a CPM2

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 drivers/net/fs_enet/fs_enet-main.c |   11 +--
 drivers/net/fs_enet/mac-scc.c  |   18 ++
 2 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/drivers/net/fs_enet/fs_enet-main.c 
b/drivers/net/fs_enet/fs_enet-main.c
index f2a4d39..b4a1480 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -982,6 +982,7 @@ static struct net_device *fs_init_instance(struct device 
*dev,
fep = netdev_priv(ndev);

fep->dev = dev;
+   fep->ndev = ndev;
dev_set_drvdata(dev, ndev);
fep->fpi = fpi;
if (fpi->init_ioports)
@@ -1085,7 +1086,6 @@ static struct net_device *fs_init_instance(struct device 
*dev,
}
registered = 1;

-
return ndev;

 err:
@@ -1312,6 +1312,9 @@ static int __devinit fs_enet_probe(struct of_device 
*ofdev,
   ndev->dev_addr[0], ndev->dev_addr[1], ndev->dev_addr[2],
   ndev->dev_addr[3], ndev->dev_addr[4], ndev->dev_addr[5]);

+   /* to initialize the fep->cur_rx,... */
+   /* not doing this, will cause a crash in fs_enet_rx_napi */
+   fs_init_bds(ndev);
return 0;

 out_free_bd:
@@ -1342,9 +1345,13 @@ static int fs_enet_remove(struct of_device *ofdev)
 }

 static struct of_device_id fs_enet_match[] = {
-#ifdef CONFIG_FS_ENET_HAS_SCC
+#if defined(CONFIG_FS_ENET_HAS_SCC)
{
+#if defined(CONFIG_CPM1)
.compatible = "fsl,cpm1-scc-enet",
+#else
+   .compatible = "fsl,cpm2-scc-enet",
+#endif
.data = (void *)&fs_scc_ops,
},
 #endif
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c
index 48f2f30..3b5ca76 100644
--- a/drivers/net/fs_enet/mac-scc.c
+++ b/drivers/net/fs_enet/mac-scc.c
@@ -50,6 +50,7 @@
 #include "fs_enet.h"

 /*/
+#define SCC_EB ((u_char)0x10)  /* Set big endian byte order */

 #if defined(CONFIG_CPM1)
 /* for a 8xx __raw_xxx's are sufficient */
@@ -65,6 +66,8 @@
 #define __fs_out16(addr, x)out_be16(addr, x)
 #define __fs_in32(addr)in_be32(addr)
 #define __fs_in16(addr)in_be16(addr)
+#define __fs_out8(addr, x) out_8(addr, x)
+#define __fs_in8(addr) in_8(addr)
 #endif

 /* write, read, set bits, clear bits */
@@ -96,10 +99,18 @@ static inline int scc_cr_cmd(struct fs_enet_private *fep, 
u32 op)
const struct fs_platform_info *fpi = fep->fpi;
int i;

+#if defined(CONFIG_CPM1)
W16(cpmp, cp_cpcr, fpi->cp_command | CPM_CR_FLG | (op << 8));
for (i = 0; i < MAX_CR_CMD_LOOPS; i++)
if ((R16(cpmp, cp_cpcr) & CPM_CR_FLG) == 0)
return 0;
+#else
+   W32(cpmp, cp_cpcr, fpi->cp_command | CPM_CR_FLG | op);
+   for (i = 0; i < MAX_CR_CMD_LOOPS; i++)
+   if ((R32(cpmp, cp_cpcr) & CPM_CR_FLG) == 0)
+   return 0;
+
+#endif

printk(KERN_ERR "%s(): Not able to issue CPM command\n",
__FUNCTION__);
@@ -306,8 +317,15 @@ static void restart(struct net_device *dev)

/* Initialize function code registers for big-endian.
 */
+#ifdef CONFIG_CPM2
+   /* from oldstyle driver in arch/ppc */
+   /* seems necessary */
+   W8(ep, sen_genscc.scc_rfcr, SCC_EB | 0x20);
+   W8(ep, sen_genscc.scc_tfcr, SCC_EB | 0x20);
+#else
W8(ep, sen_genscc.scc_rfcr, SCC_EB);
W8(ep, sen_genscc.scc_tfcr, SCC_EB);
+#endif

/* Set maximum bytes per receive buffer.
 * This appears

Re: SYSFS: need a noncaching read

2007-09-12 Thread Heiko Schocher
Hello Greg,

Am Mittwoch, den 12.09.2007, 04:39 -0700 schrieb Greg KH:
> > > Do an lseek back to 0 and then re-read, you will get called in your
> > > driver again.
> > 
> > No thats not true. I thought this too, but if I make a:
> > 
> > seek (fd, 0L, SEEK_SET);
> > 
> > in Userspace, there is no retrigger in the sysFS, my driver is *not*
> > called again. So I made a own sysfs_seek function, which does retrigger
> > the driver ...
> 
> Hm, are you sure?  Otherwise the poll() stuff would not work at all.

Yes.
Sysfs uses generic_file_llseek (). And in sysfs_read_file ()
buffer->needs_read_fill must be 1, to reread from the driver.
generic_file_llseek () doesnt change this variable.

Best regards
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: SYSFS: need a noncaching read

2007-09-12 Thread Heiko Schocher
Hello Greg

Am Mittwoch, den 12.09.2007, 03:01 -0700 schrieb Greg KH:
> On Wed, Sep 12, 2007 at 07:32:07AM +0200, Robert Schwebel wrote:
> > On Tue, Sep 11, 2007 at 11:43:17AM +0200, Heiko Schocher wrote:
> > > I have developed a device driver and use the sysFS to export some
> > > registers to userspace.
> > 
> > Uuuh, uggly. Don't do that. Device drivers are there to abstract things,
> > not to play around with registers from userspace.
> > 
> > > I opened the sysFS File for one register and did some reads from this
> > > File, but I alwas becoming the same value from the register, whats not
> > > OK, because they are changing. So I found out that the sysFS caches
> > > the reads ... :-(
> > 
> > Yes, it does. What you can do is close()ing the file handle between
> > accesses, which makes it work but is slow.
> 
> Do an lseek back to 0 and then re-read, you will get called in your
> driver again.

No thats not true. I thought this too, but if I make a:

seek (fd, 0L, SEEK_SET);

in Userspace, there is no retrigger in the sysFS, my driver is *not*
called again. So I made a own sysfs_seek function, which does retrigger
the driver ...

Is this really wanted in the sysFS, that there is no way to retrigger a
read?

thanks
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


SYSFS: need a noncaching read

2007-09-11 Thread Heiko Schocher
Hello,

I have developed a device driver and use the sysFS to export some
registers to userspace. I opened the sysFS File for one register and did
some reads from this File, but I alwas becoming the same value from the
register, whats not OK, because they are changing. So I found out that
the sysFS caches the reads ... :-(

Is there a way to retrigger the reads (in that way, that the sysFS
rereads the values from the driver), without closing and opening the
sysFS Files? Or must I better use the ioctl () Driver-interface for
exporting these registers?

I am asking this, because I must read every 10 ms 2 registers, so
doing a open/read/close for reading one registers is a little bit too
much overhead.

I made a sysFS seek function, which retriggers the read, and that works
fine, but I have again 2 syscalls, whats also is not optimal.

Or can we make a open () with a (new?)Flag, that informs the sysFS to
always reread the values from the underlying driver?

Or a new flag in the "struct attribute_group" in include/linux/sysfs.h,
which let the sysfs rereading the values?

suggestions are welcome

thanks
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


<    1   2