[PATCH 1/3 v3] Add AMCC Arches eval board support to platforms/44x

2008-10-02 Thread Victor Gallardo
The Arches Evaluation board is based on the AMCC 460GT SoC chip.
This board is a dual processor board with each processor providing
independent resources for Rapid IO, Gigabit Ethernet, and serial
communications.  Each 460GT has it's own 512MB DDR2 memory, 32MB NOR FLASH,
UART, EEPROM and temperature sensor, along with a shared debug port.
The two 460GT's will communicate with each other via shared memory,
Gigabit Ethernet and x1 PCI-Express.

Signed-off-by: Victor Gallardo [EMAIL PROTECTED]
---
 v2:
 - remove arches.c and instead use canyonlands.c
 - remove reference to IBM_NEW_EMAC_RGMII for ARCHES config
 - remove reference to IBM_NEW_EMAC_ZMII for ARCHES config
 - moved reference to IBM_NEW_EMAC_RGMII under CANYONLANDS config
 - moved reference to IBM_NEW_EMAC_ZMII under CANYONLANDS config

 v3:
 - sync up with new file structure ppc4xx_simple.c

 arch/powerpc/platforms/44x/Kconfig |   17 +++--
 arch/powerpc/platforms/44x/ppc44x_simple.c |3 ++-
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/platforms/44x/Kconfig 
b/arch/powerpc/platforms/44x/Kconfig
index f8ef279..79c1154 100644
--- a/arch/powerpc/platforms/44x/Kconfig
+++ b/arch/powerpc/platforms/44x/Kconfig
@@ -81,6 +81,17 @@ config WARP
  See http://www.pikatechnologies.com/ and follow the PIKA for Computer
  Telephony Developers link for more information.
 
+config ARCHES
+   bool Arches
+   depends on 44x
+   default n
+   select PPC44x_SIMPLE
+   select 460EX # Odd since it uses 460GT but the effects are the same
+   select PCI
+   select PPC4xx_PCI_EXPRESS
+   help
+ This option enables support for the AMCC Dual PPC460GT evaluation 
board.
+
 config CANYONLANDS
bool Canyonlands
depends on 44x
@@ -89,6 +100,8 @@ config CANYONLANDS
select 460EX
select PCI
select PPC4xx_PCI_EXPRESS
+   select IBM_NEW_EMAC_RGMII
+   select IBM_NEW_EMAC_ZMII
help
  This option enables support for the AMCC PPC460EX evaluation board.
 
@@ -100,6 +113,8 @@ config GLACIER
select 460EX # Odd since it uses 460GT but the effects are the same
select PCI
select PPC4xx_PCI_EXPRESS
+   select IBM_NEW_EMAC_RGMII
+   select IBM_NEW_EMAC_ZMII
help
  This option enables support for the AMCC PPC460GT evaluation board.
 
@@ -195,8 +210,6 @@ config 460EX
bool
select PPC_FPU
select IBM_NEW_EMAC_EMAC4
-   select IBM_NEW_EMAC_RGMII
-   select IBM_NEW_EMAC_ZMII
select IBM_NEW_EMAC_TAH
 
 # 44x errata/workaround config symbols, selected by the CPU models above
diff --git a/arch/powerpc/platforms/44x/ppc44x_simple.c 
b/arch/powerpc/platforms/44x/ppc44x_simple.c
index 57e7120..2967126 100644
--- a/arch/powerpc/platforms/44x/ppc44x_simple.c
+++ b/arch/powerpc/platforms/44x/ppc44x_simple.c
@@ -50,8 +50,9 @@ machine_device_initcall(ppc44x_simple, ppc44x_device_probe);
  * board.c file for it rather than adding it to this list.
  */
 static char *board[] __initdata = {
+   amcc,arches,
amcc,bamboo,
-   amcc,cayonlands,
+   amcc,canyonlands,
amcc,glacier,
ibm,ebony,
amcc,katmai,
-- 
1.5.5

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


[PATCH 2/3 v3] Add AMCC Arches DTS

2008-10-02 Thread Victor Gallardo
Basic functionality for the AMCC Arches eval Board.

Signed-off-by: Victor Gallardo [EMAIL PROTECTED]
---
 v2:
 - only include basic functionality
 v3:
 - update description header

 arch/powerpc/boot/dts/arches.dts |  293 ++
 1 files changed, 293 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/arches.dts

diff --git a/arch/powerpc/boot/dts/arches.dts b/arch/powerpc/boot/dts/arches.dts
new file mode 100644
index 000..d9113b1
--- /dev/null
+++ b/arch/powerpc/boot/dts/arches.dts
@@ -0,0 +1,293 @@
+/*
+ * Device Tree Source for AMCC Arches (dual 460GT board)
+ *
+ * (C) Copyright 2008 Applied Micro Circuits Corporation
+ * Victor Gallardo [EMAIL PROTECTED]
+ * Adam Graham [EMAIL PROTECTED]
+ *
+ * Based on the glacier.dts file
+ *   Stefan Roese [EMAIL PROTECTED]
+ *   Copyright 2008 DENX Software Engineering
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/dts-v1/;
+
+/ {
+   #address-cells = 2;
+   #size-cells = 1;
+   model = amcc,arches;
+   compatible = amcc,arches;
+   dcr-parent = {/cpus/[EMAIL PROTECTED];
+
+   aliases {
+   ethernet0 = EMAC0;
+   ethernet1 = EMAC1;
+   ethernet2 = EMAC2;
+   serial0 = UART0;
+   };
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   [EMAIL PROTECTED] {
+   device_type = cpu;
+   model = PowerPC,460GT;
+   reg = 0x;
+   clock-frequency = 0; /* Filled in by U-Boot */
+   timebase-frequency = 0; /* Filled in by U-Boot */
+   i-cache-line-size = 32;
+   d-cache-line-size = 32;
+   i-cache-size = 32768;
+   d-cache-size = 32768;
+   dcr-controller;
+   dcr-access-method = native;
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x 0x 0x; /* Filled in by 
U-Boot */
+   };
+
+   UIC0: interrupt-controller0 {
+   compatible = ibm,uic-460gt,ibm,uic;
+   interrupt-controller;
+   cell-index = 0;
+   dcr-reg = 0x0c0 0x009;
+   #address-cells = 0;
+   #size-cells = 0;
+   #interrupt-cells = 2;
+   };
+
+   UIC1: interrupt-controller1 {
+   compatible = ibm,uic-460gt,ibm,uic;
+   interrupt-controller;
+   cell-index = 1;
+   dcr-reg = 0x0d0 0x009;
+   #address-cells = 0;
+   #size-cells = 0;
+   #interrupt-cells = 2;
+   interrupts = 0x1e 0x4 0x1f 0x4; /* cascade */
+   interrupt-parent = UIC0;
+   };
+
+   UIC2: interrupt-controller2 {
+   compatible = ibm,uic-460gt,ibm,uic;
+   interrupt-controller;
+   cell-index = 2;
+   dcr-reg = 0x0e0 0x009;
+   #address-cells = 0;
+   #size-cells = 0;
+   #interrupt-cells = 2;
+   interrupts = 0xa 0x4 0xb 0x4; /* cascade */
+   interrupt-parent = UIC0;
+   };
+
+   UIC3: interrupt-controller3 {
+   compatible = ibm,uic-460gt,ibm,uic;
+   interrupt-controller;
+   cell-index = 3;
+   dcr-reg = 0x0f0 0x009;
+   #address-cells = 0;
+   #size-cells = 0;
+   #interrupt-cells = 2;
+   interrupts = 0x10 0x4 0x11 0x4; /* cascade */
+   interrupt-parent = UIC0;
+   };
+
+   SDR0: sdr {
+   compatible = ibm,sdr-460gt;
+   dcr-reg = 0x00e 0x002;
+   };
+
+   CPR0: cpr {
+   compatible = ibm,cpr-460gt;
+   dcr-reg = 0x00c 0x002;
+   };
+
+   plb {
+   compatible = ibm,plb-460gt, ibm,plb4;
+   #address-cells = 2;
+   #size-cells = 1;
+   ranges;
+   clock-frequency = 0; /* Filled in by U-Boot */
+
+   SDRAM0: sdram {
+  

[PATCH 3/3 v3] Add AMCC Arches defconfig file

2008-10-02 Thread Victor Gallardo

Signed-off-by: Victor Gallardo [EMAIL PROTECTED]
---
 v2:
 - remove reference to IBM_NEW_EMAC_RGMII
 - remove reference to IBM_NEW_EMAC_ZMII

 v3:
 - sync up to use CONFIG_PPC44x_SIMPLE

 arch/powerpc/configs/44x/arches_defconfig |  767 +
 1 files changed, 767 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/configs/44x/arches_defconfig

diff --git a/arch/powerpc/configs/44x/arches_defconfig 
b/arch/powerpc/configs/44x/arches_defconfig
new file mode 100644
index 000..70f4607
--- /dev/null
+++ b/arch/powerpc/configs/44x/arches_defconfig
@@ -0,0 +1,767 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.27-rc5
+# Wed Oct  1 15:54:57 2008
+#
+# CONFIG_PPC64 is not set
+
+#
+# Processor support
+#
+# CONFIG_6xx is not set
+# CONFIG_PPC_85xx is not set
+# CONFIG_PPC_8xx is not set
+# CONFIG_40x is not set
+CONFIG_44x=y
+# CONFIG_E200 is not set
+CONFIG_PPC_FPU=y
+CONFIG_4xx=y
+CONFIG_BOOKE=y
+CONFIG_PTE_64BIT=y
+CONFIG_PHYS_64BIT=y
+# CONFIG_PPC_MM_SLICES is not set
+CONFIG_NOT_COHERENT_CACHE=y
+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_HAVE_SETUP_PER_CPU_AREA is not set
+CONFIG_IRQ_PER_CPU=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_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_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=y
+# CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+# CONFIG_DEFAULT_UIMAGE is not set
+CONFIG_PPC_DCR_NATIVE=y
+# CONFIG_PPC_DCR_MMIO is not set
+CONFIG_PPC_DCR=y
+CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+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_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLUB_DEBUG=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
+CONFIG_HAVE_IOREMAP_PROT=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+# CONFIG_HAVE_DMA_ATTRS is not set
+# CONFIG_USE_GENERIC_SMP_HELPERS is not set
+# CONFIG_HAVE_CLK is not set
+CONFIG_PROC_PAGE_MONITOR=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED=anticipatory
+CONFIG_CLASSIC_RCU=y
+CONFIG_PPC4xx_PCI_EXPRESS=y
+
+#
+# Platform support
+#
+# CONFIG_PPC_CELL is not set
+# CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PQ2ADS is not set
+# CONFIG_BAMBOO is not set
+# CONFIG_EBONY is not set
+# CONFIG_SAM440EP is not set
+# CONFIG_SEQUOIA is not set
+# CONFIG_TAISHAN is not set
+# CONFIG_KATMAI is not set
+# CONFIG_RAINIER is not set
+# CONFIG_WARP is not set
+CONFIG_ARCHES=y
+# CONFIG_CANYONLANDS is not set
+# CONFIG_GLACIER is not set
+# CONFIG_YOSEMITE is not set
+# 

[PATCH v2] ibm_newemac: Add support for GPCS, SGMII and M88E1112 PHY

2008-10-02 Thread Victor Gallardo

Signed-off-by: Victor Gallardo [EMAIL PROTECTED]
---
 v2:
 - update to sync up with latest ibm_newemac driver

 arch/powerpc/include/asm/dcr-regs.h |4 ++
 drivers/net/ibm_newemac/core.c  |   58 
 drivers/net/ibm_newemac/core.h  |8 +++
 drivers/net/ibm_newemac/phy.c   |   84 +++
 drivers/net/ibm_newemac/phy.h   |2 +
 5 files changed, 147 insertions(+), 9 deletions(-)

diff --git a/arch/powerpc/include/asm/dcr-regs.h 
b/arch/powerpc/include/asm/dcr-regs.h
index 29b0ece..f15296c 100644
--- a/arch/powerpc/include/asm/dcr-regs.h
+++ b/arch/powerpc/include/asm/dcr-regs.h
@@ -68,6 +68,10 @@
 #define SDR0_UART3 0x0123
 #define SDR0_CUST0 0x4000
 
+/* SDRs (460EX/460GT) */
+#define SDR0_ETH_CFG   0x4103
+#define SDR0_ETH_CFG_ECS   0x0100  /* EMAC int clk source */
+
 /*
  * All those DCR register addresses are offsets from the base address
  * for the SRAM0 controller (e.g. 0x20 on 440GX). The base address is
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c
index ccd9d90..58308a3 100644
--- a/drivers/net/ibm_newemac/core.c
+++ b/drivers/net/ibm_newemac/core.c
@@ -130,6 +130,7 @@ static inline void emac_report_timeout_error(struct 
emac_instance *dev,
 const char *error)
 {
if (emac_has_feature(dev, EMAC_FTR_440GX_PHY_CLK_FIX |
+ EMAC_FTR_460EX_PHY_CLK_FIX |
  EMAC_FTR_440EP_PHY_CLK_FIX))
DBG(dev, %s NL, error);
else if (net_ratelimit())
@@ -201,13 +202,15 @@ static inline int emac_phy_supports_gige(int phy_mode)
 {
return  phy_mode == PHY_MODE_GMII ||
phy_mode == PHY_MODE_RGMII ||
+   phy_mode == PHY_MODE_SGMII ||
phy_mode == PHY_MODE_TBI ||
phy_mode == PHY_MODE_RTBI;
 }
 
 static inline int emac_phy_gpcs(int phy_mode)
 {
-   return  phy_mode == PHY_MODE_TBI ||
+   return  phy_mode == PHY_MODE_SGMII ||
+   phy_mode == PHY_MODE_TBI ||
phy_mode == PHY_MODE_RTBI;
 }
 
@@ -351,10 +354,24 @@ static int emac_reset(struct emac_instance *dev)
emac_tx_disable(dev);
}
 
+#ifdef CONFIG_PPC_DCR_NATIVE
+   /* Enable internal clock source */
+   if (emac_has_feature(dev, EMAC_FTR_460EX_PHY_CLK_FIX))
+   dcri_clrset(SDR0, SDR0_ETH_CFG,
+   0, SDR0_ETH_CFG_ECS  dev-cell_index);
+#endif
+
out_be32(p-mr0, EMAC_MR0_SRST);
while ((in_be32(p-mr0)  EMAC_MR0_SRST)  n)
--n;
 
+#ifdef CONFIG_PPC_DCR_NATIVE
+/* Enable external clock source */
+   if (emac_has_feature(dev, EMAC_FTR_460EX_PHY_CLK_FIX))
+   dcri_clrset(SDR0, SDR0_ETH_CFG,
+   SDR0_ETH_CFG_ECS  dev-cell_index, 0);
+#endif
+
if (n) {
dev-reset_failed = 0;
return 0;
@@ -547,8 +564,9 @@ static int emac_configure(struct emac_instance *dev)
switch (dev-phy.speed) {
case SPEED_1000:
if (emac_phy_gpcs(dev-phy.mode)) {
-   mr1 |= EMAC_MR1_MF_1000GPCS |
-   EMAC_MR1_MF_IPPA(dev-phy.address);
+   mr1 |= EMAC_MR1_MF_1000GPCS | EMAC_MR1_MF_IPPA(
+   (dev-phy.gpcs_address != 0x) ?
+dev-phy.gpcs_address : dev-phy.address);
 
/* Put some arbitrary OUI, Manuf  Rev IDs so we can
 * identify this GPCS PHY later.
@@ -660,8 +678,12 @@ static int emac_configure(struct emac_instance *dev)
out_be32(p-iser,  r);
 
/* We need to take GPCS PHY out of isolate mode after EMAC reset */
-   if (emac_phy_gpcs(dev-phy.mode))
-   emac_mii_reset_phy(dev-phy);
+   if (emac_phy_gpcs(dev-phy.mode)) {
+   if (dev-phy.gpcs_address != 0x)
+   emac_mii_reset_gpcs(dev-phy);
+   else
+   emac_mii_reset_phy(dev-phy);
+   }
 
return 0;
 }
@@ -866,7 +888,9 @@ static int emac_mdio_read(struct net_device *ndev, int id, 
int reg)
struct emac_instance *dev = netdev_priv(ndev);
int res;
 
-   res = __emac_mdio_read(dev-mdio_instance ? dev-mdio_instance : dev,
+   res = __emac_mdio_read((dev-mdio_instance 
+   dev-phy.gpcs_address != id) ?
+   dev-mdio_instance : dev,
   (u8) id, (u8) reg);
return res;
 }
@@ -875,7 +899,9 @@ static void emac_mdio_write(struct net_device *ndev, int 
id, int reg, int val)
 {
struct emac_instance *dev = netdev_priv(ndev);
 
-   __emac_mdio_write(dev-mdio_instance ? dev-mdio_instance : dev,
+   __emac_mdio_write((dev-mdio_instance 
+  

Re: [PATCH v2] ibm_newemac: Add support for GPCS, SGMII and M88E1112 PHY

2008-10-02 Thread Benjamin Herrenschmidt
On Wed, 2008-10-01 at 23:37 -0700, Victor Gallardo wrote:
 Signed-off-by: Victor Gallardo [EMAIL PROTECTED]
 ---
  v2:
  - update to sync up with latest ibm_newemac driver

Ack.

Is this on top of Josh work ?

Ben.

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


Re: [PATCH] Added preliminary support for Netstal HCU4 board

2008-10-02 Thread David Gibson
On Thu, Oct 02, 2008 at 07:12:14AM +0200, Niklaus Giger wrote:
 Hi David
 
 Am Donnerstag 02 Oktober 2008 02.52:08 schrieb David Gibson:
  That will work, but will lose comments, references, and other
  formatting, because it essentially compiles then decompiles the tree.
  You probably don't want to do that.  There's also an explicit
  conversion program, convert-dtsv0, which will preserve that
  not-significant-to-output, but useful for the reader information.
 
 Thanks for providing me the hint. Using it, would surely  have been easier 
 than adding manually the comment again. However I using the search 
 dtc dts-v1 syntax conversion script didn't give me any hint and even in the 
 the current  http://www.jdl.com/software/dtc.git I find no word in the 
 Documentation about convert-dtsv0.
 
 Neither does it get installed when calling make install.

Ah, yes, that's a bug.

 Therefore I would suggest you to add a small remark like this:
 
 convert-dtsv0 is a small utility program which converts (DTS)
 Device Tree Source from the obsolete version 0 to version 1. Version 1 DTS
 files are marked by line /dts-v1/; at the top of the file.

Add this remark where, though?

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH]ppc4xx-Walnut: fixes early boot messages

2008-10-02 Thread David Gibson
On Thu, Oct 02, 2008 at 07:36:40AM +0200, Niklaus Giger wrote:
 Inherits the baudrate from U-boot to print things like:
 Using Walnut machine description  
 Linux version ..
 console [udbg0] enabled   
 
Uh.. but what if you're booting from cuboot or openbios, rather than a
device-tree-aware uboot.

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: regression on imac G3: problems with sound

2008-10-02 Thread Takashi Iwai
At Wed, 1 Oct 2008 23:47:34 +0300,
[EMAIL PROTECTED] wrote:
 
 2008/10/1, Mariusz Kozlowski [EMAIL PROTECTED]:
  Hello,
 
  I found that on my old iMac G3 aumix behaves weird on newer (up to
  2.6.27-rc8) kernels. The sound is only present _when_ muted and is quiet
  I'd say 10% of 'normal' max level. If you turn the volume up - the box is
  silent.
  If you unmute - the box is silent. 100% reproducible.
 
  Bisection result is a bit surprising as it seems it was introduced some time
  ago,
  in 2.6.25 ~ 2.6.26-rc1 window:
 
  commit a8c2a6bf464d983c642c8b8b001a57aabbf76673
  Author: Risto Suominen [EMAIL PROTECTED]
  Date:   Thu Apr 17 17:55:30 2008 +0200
 
  [ALSA] snd-powermac: AWACS and Screamer mixers for PM7500, Beige, and
  iMac SL
 
  Add mixer controls and correct headphone detection bits for PowerMacs
  7300/7500 (AWACS) and G3 Beige (Screamer), and iMac G3 Slot-loading
  (Screamer).
 
 
  Mariusz
 
 
 
  processor   : 0
  cpu : 740/750
  temperature : 52 C (uncalibrated)
  clock   : 400.00MHz
  revision: 2.2 (pvr 0008 0202)
  bogomips: 49.79
  timebase: 24967326
  platform: PowerMac
  model   : PowerMac2,1
  machine : PowerMac2,1
  motherboard : PowerMac2,1 MacRISC2 MacRISC Power Macintosh
  detected as : 66 (iMac FireWire)
  pmac flags  : 0014
  L2 cache: 512K unified
  pmac-generation : NewWorld
 
  :00:0b.0 Host bridge: Apple Computer Inc. UniNorth AGP
  :00:10.0 Display controller: ATI Technologies Inc Rage 128 RL/VR AGP
  0001:10:0b.0 Host bridge: Apple Computer Inc. UniNorth PCI
  0001:10:12.0 FireWire (IEEE 1394): Texas Instruments TSB12LV23 IEEE-1394
  Controller
  0001:10:13.0 Ethernet controller: Digital Equipment Corporation DECchip
  21142/43 (rev 41)
  0001:10:17.0 Class ff00: Apple Computer Inc. KeyLargo Mac I/O (rev 02)
  0001:10:18.0 USB Controller: Apple Computer Inc. KeyLargo USB
  0001:10:19.0 USB Controller: Apple Computer Inc. KeyLargo USB
  0002:20:0b.0 Host bridge: Apple Computer Inc. UniNorth Internal PCI
 
 
 Mariusz, thank you for the report. This is my fault. Sorry.
 
 PowerMac2,1 seems to have the mute bit reversed compared to later
 models, PowerMac2,2 and PowerMac4,1, which I was using for testing my
 changes.
 
 This has been fixed in a later patch that should be included in kernel
 2.6.27, I believe.
 
 Takashi, when was this (or will be) included? I sent two patches on 
 2008-08-25.

No, it wasn't because it's not clear whether the patches are
regression fixes.

Mariusz, try sound git tree.  Risto's patches are already there.
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git

If it works, then try to cherry-pick the following two commits onto
the vanilla kernel:
- 8352a6fe67a0f804302b93178f2e13b66004a693
  ALSA: snd-powermac: mixers for PowerMac G4 AGP
- e25ae4fd3ccba79cfd5628642754a145394225f6
  ALSA: snd-powermac: HP detection for 1st iMac G3 SL

thanks,

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


RE: [PATCH v2] ibm_newemac: Add support for GPCS, SGMII andM88E1112 PHY

2008-10-02 Thread Victor Gallardo
 Signed-off-by: Victor Gallardo [EMAIL PROTECTED]
 ---
  v2:
  - update to sync up with latest ibm_newemac driver

Ack.

Is this on top of Josh work ?

Ben.
 
Yes, this based on Josh's git repository. Should I sync up with your git 
repository or is Josh's OK.
 
Regards,
 
Victor Gallardo


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

RE: [PATCH v2] ibm_newemac: Add support for GPCS, SGMII andM88E1112 PHY

2008-10-02 Thread Benjamin Herrenschmidt
On Thu, 2008-10-02 at 00:30 -0700, Victor Gallardo wrote:
 
  
 Yes, this based on Josh's git repository. Should I sync up with your
 git repository or is Josh's OK.

Josh is fine.

Jeff, can we merge all those EMAC patches via the powerpc git ? need an
ack from you I suppose ...

Thanks,
Ben.


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


Re: [PATCH] powerpc: dtb and purgatory support for ppc32

2008-10-02 Thread Sebastian Siewior

Kumar Gala wrote:


are you trying to get this accepted?


If the reviewer don't have any objections yes. You sound
like there is something terrible wrong. Do you want it in smaller pieces?


- k

Sebastian
--
Firmensitz: 88690 Uhldingen, Auf dem Berg 3
Registergericht: Amtsgericht Freiburg i. Br., HRB 700 806;
StNr. 87007/0; Ust-Id Nr.: DE252739476
Geschäftsführer: Heinz Egger, Thomas Gleixner
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] powerpc/85xx: Wire up RTC interrupt on MPC8536DS

2008-10-02 Thread Kumar Gala
Add interrupt info to the MPC8536DS .dts for the RTC

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---
 arch/powerpc/boot/dts/mpc8536ds.dts |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8536ds.dts 
b/arch/powerpc/boot/dts/mpc8536ds.dts
index 1505d68..93fdd99 100644
--- a/arch/powerpc/boot/dts/mpc8536ds.dts
+++ b/arch/powerpc/boot/dts/mpc8536ds.dts
@@ -91,6 +91,8 @@
[EMAIL PROTECTED] {
compatible = dallas,ds3232;
reg = 0x68;
+   interrupts = 0 0x1;
+   interrupt-parent = mpic;
};
};
 
-- 
1.5.5.1

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


Re: [PATCH] powerpc: dtb and purgatory support for ppc32

2008-10-02 Thread Simon Horman
On Thu, Oct 02, 2008 at 09:50:16AM +0200, Sebastian Siewior wrote:
 Kumar Gala wrote:
 
  are you trying to get this accepted?
 
 If the reviewer don't have any objections yes. You sound
 like there is something terrible wrong. Do you want it in smaller pieces?

I'm not speaking on behalf of Kumar Gala, just on behalf of myself.

I would like to get some review of this patch by if possible.
Also, I'm a little unclear of how it will interact with the
patches that Mohan Kumar sent this week. But at this point
I don't see any particular need to break the patch up into
smaller pieices.


-- 
Simon Horman
  VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
  H: www.vergenet.net/~horms/ W: www.valinux.co.jp/en

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


[PATCH,CFT] dynamic struct mii_bus allocation

2008-10-02 Thread Lennert Buytenhek
Hi *,

You're listed as maintainer of one of the network drivers in the tree
that use phylib.  Available at the URL below is a change to the phylib
API (dynamic allocation of struct mii_bus, which is needed for hooking
up mdio buses into the device tree) that needs corresponding mdio bus
driver changes.  I've patched all mdio bus drivers I could find, and
tried not to break anything, but it's possible I might have
inadvertently broken something, so I'd like you to test these changes
and let me know if they work for you or not:

git://git.marvell.com/phylib.git master

As a side-effect of the last patch, you should end up with a list of
mdio buses in your system in /sys/class/mdio_bus.


thanks,
Lennert


The following changes since commit e69c4e0f1210450841e40716894ba6a877b31d52:
  Vlad Yasevich (1):
sctp: correctly save sctp_adaptation from parameter.

are available in the git repository at:

  git://git.marvell.com/phylib.git master

Lennert Buytenhek (5):
  phylib: phy_mii_ioctl() fixes
  phylib: add mdiobus_{read,write}
  phylib: rename mii_bus::dev to mii_bus::parent
  phylib: move to dynamic allocation of struct mii_bus
  phylib: give mdio buses a device tree presence

 arch/powerpc/platforms/82xx/ep8248e.c |2 +-
 arch/powerpc/platforms/pasemi/gpio_mdio.c |6 +-
 drivers/net/au1000_eth.c  |   43 ++---
 drivers/net/au1000_eth.h  |2 +-
 drivers/net/bfin_mac.c|   31 ---
 drivers/net/bfin_mac.h|2 +-
 drivers/net/cpmac.c   |   51 ++
 drivers/net/fec_mpc52xx_phy.c |8 +-
 drivers/net/fs_enet/mii-bitbang.c |9 +-
 drivers/net/fs_enet/mii-fec.c |8 +-
 drivers/net/gianfar_mii.c |9 +-
 drivers/net/macb.c|   49 ++
 drivers/net/macb.h|2 +-
 drivers/net/mv643xx_eth.c |   32 ---
 drivers/net/phy/fixed.c   |   29 --
 drivers/net/phy/mdio-bitbang.c|4 +-
 drivers/net/phy/mdio-ofgpio.c |   11 +-
 drivers/net/phy/mdio_bus.c|  144 -
 drivers/net/phy/phy.c |   54 +--
 drivers/net/sb1250-mac.c  |   36 +---
 drivers/net/sh_eth.c  |4 +-
 drivers/net/tc35815.c |   45 ++
 drivers/net/tg3.c |   66 +++---
 drivers/net/tg3.h |2 +-
 drivers/net/ucc_geth_mii.c|9 +-
 include/linux/phy.h   |   54 ++--
 26 files changed, 456 insertions(+), 256 deletions(-)
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH v2] ibm_newemac: Add support for GPCS, SGMII andM88E1112 PHY

2008-10-02 Thread Josh Boyer
On Thu, 02 Oct 2008 17:32:39 +1000
Benjamin Herrenschmidt [EMAIL PROTECTED] wrote:

 On Thu, 2008-10-02 at 00:30 -0700, Victor Gallardo wrote:
  
   
  Yes, this based on Josh's git repository. Should I sync up with your
  git repository or is Josh's OK.
 
 Josh is fine.
 
 Jeff, can we merge all those EMAC patches via the powerpc git ? need an
 ack from you I suppose ...

I already have this in my tree.  Jeff already acked it (twice now I
think).

http://git.kernel.org/?p=linux/kernel/git/jwboyer/powerpc-4xx.git;a=shortlog;h=next

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


Re: [PATCH v2] ibm_newemac: Add support for GPCS, SGMII andM88E1112 PHY

2008-10-02 Thread Benjamin Herrenschmidt
On Thu, 2008-10-02 at 06:33 -0400, Josh Boyer wrote:
 On Thu, 02 Oct 2008 17:32:39 +1000
 Benjamin Herrenschmidt [EMAIL PROTECTED] wrote:
 
  On Thu, 2008-10-02 at 00:30 -0700, Victor Gallardo wrote:
   

   Yes, this based on Josh's git repository. Should I sync up with your
   git repository or is Josh's OK.
  
  Josh is fine.
  
  Jeff, can we merge all those EMAC patches via the powerpc git ? need an
  ack from you I suppose ...
 
 I already have this in my tree.  Jeff already acked it (twice now I
 think).
 
 http://git.kernel.org/?p=linux/kernel/git/jwboyer/powerpc-4xx.git;a=shortlog;h=next

Ok so it will go in when I get your pull request then :-0

Cheers,
Ben.


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


Re: regression on imac G3: problems with sound

2008-10-02 Thread Mariusz Kozlowski
Hello,

 At Wed, 1 Oct 2008 23:47:34 +0300,
 [EMAIL PROTECTED] wrote:
  
  2008/10/1, Mariusz Kozlowski [EMAIL PROTECTED]:
   Hello,
  
 I found that on my old iMac G3 aumix behaves weird on newer (up to
   2.6.27-rc8) kernels. The sound is only present _when_ muted and is quiet
   I'd say 10% of 'normal' max level. If you turn the volume up - the box is
   silent.
   If you unmute - the box is silent. 100% reproducible.
  
   Bisection result is a bit surprising as it seems it was introduced some 
   time
   ago,
   in 2.6.25 ~ 2.6.26-rc1 window:
  
   commit a8c2a6bf464d983c642c8b8b001a57aabbf76673
   Author: Risto Suominen [EMAIL PROTECTED]
   Date:   Thu Apr 17 17:55:30 2008 +0200
  
   [ALSA] snd-powermac: AWACS and Screamer mixers for PM7500, Beige, and
   iMac SL
  
   Add mixer controls and correct headphone detection bits for PowerMacs
   7300/7500 (AWACS) and G3 Beige (Screamer), and iMac G3 Slot-loading
   (Screamer).
  
  
 Mariusz
  
  
  
   processor   : 0
   cpu : 740/750
   temperature : 52 C (uncalibrated)
   clock   : 400.00MHz
   revision: 2.2 (pvr 0008 0202)
   bogomips: 49.79
   timebase: 24967326
   platform: PowerMac
   model   : PowerMac2,1
   machine : PowerMac2,1
   motherboard : PowerMac2,1 MacRISC2 MacRISC Power Macintosh
   detected as : 66 (iMac FireWire)
   pmac flags  : 0014
   L2 cache: 512K unified
   pmac-generation : NewWorld
  
   :00:0b.0 Host bridge: Apple Computer Inc. UniNorth AGP
   :00:10.0 Display controller: ATI Technologies Inc Rage 128 RL/VR AGP
   0001:10:0b.0 Host bridge: Apple Computer Inc. UniNorth PCI
   0001:10:12.0 FireWire (IEEE 1394): Texas Instruments TSB12LV23 IEEE-1394
   Controller
   0001:10:13.0 Ethernet controller: Digital Equipment Corporation DECchip
   21142/43 (rev 41)
   0001:10:17.0 Class ff00: Apple Computer Inc. KeyLargo Mac I/O (rev 02)
   0001:10:18.0 USB Controller: Apple Computer Inc. KeyLargo USB
   0001:10:19.0 USB Controller: Apple Computer Inc. KeyLargo USB
   0002:20:0b.0 Host bridge: Apple Computer Inc. UniNorth Internal PCI
  
  
  Mariusz, thank you for the report. This is my fault. Sorry.
  
  PowerMac2,1 seems to have the mute bit reversed compared to later
  models, PowerMac2,2 and PowerMac4,1, which I was using for testing my
  changes.
  
  This has been fixed in a later patch that should be included in kernel
  2.6.27, I believe.
  
  Takashi, when was this (or will be) included? I sent two patches on 
  2008-08-25.
 
 No, it wasn't because it's not clear whether the patches are
 regression fixes.
 
 Mariusz, try sound git tree.  Risto's patches are already there.
 git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
 
 If it works, then try to cherry-pick the following two commits onto
 the vanilla kernel:
 - 8352a6fe67a0f804302b93178f2e13b66004a693
   ALSA: snd-powermac: mixers for PowerMac G4 AGP
 - e25ae4fd3ccba79cfd5628642754a145394225f6
   ALSA: snd-powermac: HP detection for 1st iMac G3 SL

sound-2.6 works ok.
linux-2.6 plus the two patches above solve the sound problem for me.

Will they go into 2.6.27?

 thanks,
 
 Takashi

BTW git-cherry-pick is a cool thing :)

Thanks,

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


Re: regression on imac G3: problems with sound

2008-10-02 Thread Takashi Iwai
At Thu, 2 Oct 2008 12:39:20 +0200,
Mariusz Kozlowski wrote:
 
 Hello,
 
  At Wed, 1 Oct 2008 23:47:34 +0300,
  [EMAIL PROTECTED] wrote:
   
   2008/10/1, Mariusz Kozlowski [EMAIL PROTECTED]:
Hello,
   
I found that on my old iMac G3 aumix behaves weird on newer (up 
to
2.6.27-rc8) kernels. The sound is only present _when_ muted and is quiet
I'd say 10% of 'normal' max level. If you turn the volume up - the box 
is
silent.
If you unmute - the box is silent. 100% reproducible.
   
Bisection result is a bit surprising as it seems it was introduced some 
time
ago,
in 2.6.25 ~ 2.6.26-rc1 window:
   
commit a8c2a6bf464d983c642c8b8b001a57aabbf76673
Author: Risto Suominen [EMAIL PROTECTED]
Date:   Thu Apr 17 17:55:30 2008 +0200
   
[ALSA] snd-powermac: AWACS and Screamer mixers for PM7500, Beige, 
and
iMac SL
   
Add mixer controls and correct headphone detection bits for 
PowerMacs
7300/7500 (AWACS) and G3 Beige (Screamer), and iMac G3 Slot-loading
(Screamer).
   
   
Mariusz
   
   
   
processor   : 0
cpu : 740/750
temperature : 52 C (uncalibrated)
clock   : 400.00MHz
revision: 2.2 (pvr 0008 0202)
bogomips: 49.79
timebase: 24967326
platform: PowerMac
model   : PowerMac2,1
machine : PowerMac2,1
motherboard : PowerMac2,1 MacRISC2 MacRISC Power Macintosh
detected as : 66 (iMac FireWire)
pmac flags  : 0014
L2 cache: 512K unified
pmac-generation : NewWorld
   
:00:0b.0 Host bridge: Apple Computer Inc. UniNorth AGP
:00:10.0 Display controller: ATI Technologies Inc Rage 128 RL/VR AGP
0001:10:0b.0 Host bridge: Apple Computer Inc. UniNorth PCI
0001:10:12.0 FireWire (IEEE 1394): Texas Instruments TSB12LV23 IEEE-1394
Controller
0001:10:13.0 Ethernet controller: Digital Equipment Corporation DECchip
21142/43 (rev 41)
0001:10:17.0 Class ff00: Apple Computer Inc. KeyLargo Mac I/O (rev 02)
0001:10:18.0 USB Controller: Apple Computer Inc. KeyLargo USB
0001:10:19.0 USB Controller: Apple Computer Inc. KeyLargo USB
0002:20:0b.0 Host bridge: Apple Computer Inc. UniNorth Internal PCI
   
   
   Mariusz, thank you for the report. This is my fault. Sorry.
   
   PowerMac2,1 seems to have the mute bit reversed compared to later
   models, PowerMac2,2 and PowerMac4,1, which I was using for testing my
   changes.
   
   This has been fixed in a later patch that should be included in kernel
   2.6.27, I believe.
   
   Takashi, when was this (or will be) included? I sent two patches on 
   2008-08-25.
  
  No, it wasn't because it's not clear whether the patches are
  regression fixes.
  
  Mariusz, try sound git tree.  Risto's patches are already there.
  git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
  
  If it works, then try to cherry-pick the following two commits onto
  the vanilla kernel:
  - 8352a6fe67a0f804302b93178f2e13b66004a693
ALSA: snd-powermac: mixers for PowerMac G4 AGP
  - e25ae4fd3ccba79cfd5628642754a145394225f6
ALSA: snd-powermac: HP detection for 1st iMac G3 SL
 
 sound-2.6 works ok.
 linux-2.6 plus the two patches above solve the sound problem for me.
 
 Will they go into 2.6.27?

Thanks for checking.  I'll add them to the next pull request.


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


Re: [PATCH v2] ibm_newemac: Add support for GPCS, SGMII andM88E1112 PHY

2008-10-02 Thread Josh Boyer
On Thu, 02 Oct 2008 20:34:28 +1000
Benjamin Herrenschmidt [EMAIL PROTECTED] wrote:

 On Thu, 2008-10-02 at 06:33 -0400, Josh Boyer wrote:
  On Thu, 02 Oct 2008 17:32:39 +1000
  Benjamin Herrenschmidt [EMAIL PROTECTED] wrote:
  
   On Thu, 2008-10-02 at 00:30 -0700, Victor Gallardo wrote:

 
Yes, this based on Josh's git repository. Should I sync up with your
git repository or is Josh's OK.
   
   Josh is fine.
   
   Jeff, can we merge all those EMAC patches via the powerpc git ? need an
   ack from you I suppose ...
  
  I already have this in my tree.  Jeff already acked it (twice now I
  think).
  
  http://git.kernel.org/?p=linux/kernel/git/jwboyer/powerpc-4xx.git;a=shortlog;h=next
 
 Ok so it will go in when I get your pull request then :-0

Yep.  You could pull now if you'd like.  I have a few more patches I'd
like to get in before the merge window, but if it helps things I can do
those in a separate pull request.

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


Re: [PATCH v2] ibm_newemac: Add support for GPCS, SGMII andM88E1112 PHY

2008-10-02 Thread Josh Boyer
On Thu, Oct 02, 2008 at 06:56:48AM -0400, Josh Boyer wrote:
   Jeff, can we merge all those EMAC patches via the powerpc git ? need an
   ack from you I suppose ...
  
  I already have this in my tree.  Jeff already acked it (twice now I
  think).
  
  http://git.kernel.org/?p=linux/kernel/git/jwboyer/powerpc-4xx.git;a=shortlog;h=next
 
 Ok so it will go in when I get your pull request then :-0

Yep.  You could pull now if you'd like.  I have a few more patches I'd
like to get in before the merge window, but if it helps things I can do
those in a separate pull request.

Actually, it seems not.  I pulled in an older version of the patch.  I'll
grab the new version today.

/me sighs.

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


Re: [PATCH]ppc4xx-Walnut: fixes early boot messages

2008-10-02 Thread Josh Boyer
On Thu, Oct 02, 2008 at 04:39:54PM +1000, David Gibson wrote:
On Thu, Oct 02, 2008 at 07:36:40AM +0200, Niklaus Giger wrote:
 Inherits the baudrate from U-boot to print things like:
 Using Walnut machine description  
 Linux version ..
 console [udbg0] enabled  
  
Uh.. but what if you're booting from cuboot or openbios, rather than a
device-tree-aware uboot.

Right.  I don't think we want this particular change.  U-Boot can always
update it anyway.

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


Re: [PATCH v2] ibm_newemac: Add support for GPCS, SGMII andM88E1112 PHY

2008-10-02 Thread Benjamin Herrenschmidt
On Thu, 2008-10-02 at 07:55 -0400, Josh Boyer wrote:
 Yep.  You could pull now if you'd like.  I have a few more patches I'd
 like to get in before the merge window, but if it helps things I can do
 those in a separate pull request.
 
 Actually, it seems not.  I pulled in an older version of the patch.  I'll
 grab the new version today.

Victor, while at it, can you do a fixup patch on top of it that guards
the new feature with a Kconfig option like some of the other ones so
that the code for it doesn't get compiled in when building, for example.
for 405GP only ?

The trick is to have the option not be part of the possible mask, so
that the compiler optimises out the feature tests as if (0) (gcc
nowadays is supposedly smart enough to rip off the code when it finds
such constructs).

Thanks !

Cheers,
Ben.


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


Re: [PATCH] powerpc: dtb and purgatory support for ppc32

2008-10-02 Thread Kumar Gala


On Oct 1, 2008, at 4:20 PM, Sebastian Andrzej Siewior wrote:


From: Sebastian Siewior [EMAIL PROTECTED]

Some code dtb scanning  filling has been borrowed from ppc64.
The old behavior is still available if compiled with GameCube,
other PowerPC platform use the can purgatory and specify a new
dtb.
The purgatory is disabled because somehting is wrong and I dunno
the reason. Booting a self containd cuImage (incl. dtb / wiuthout
the need for a bd sturct) can be booted.

Signed-off-by: Sebastian Andrzej Siewior [EMAIL PROTECTED]
---
kexec/arch/ppc/Makefile|1 +
kexec/arch/ppc/kexec-elf-ppc.c |  167 ++
kexec/arch/ppc/kexec-elf-rel-ppc.c |4 +
kexec/arch/ppc/kexec-ppc.c |  469 +++ 
-

purgatory/arch/ppc/Makefile|1 +
purgatory/arch/ppc/purgatory-ppc.c |4 +
purgatory/arch/ppc/v2wrap.S|   54 
7 files changed, 652 insertions(+), 48 deletions(-)
create mode 100644 purgatory/arch/ppc/v2wrap.S


I think I might have realized some of my confusion.. is this patch to  
the kernel or to some kexec tool?   If its to the kernel I don't  
answer at all.  If its to some kexec tool than that wasn't clear at all.


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


Re: [PATCH] powerpc: dtb and purgatory support for ppc32

2008-10-02 Thread Sebastian Andrzej Siewior

Kumar Gala wrote:


On Oct 1, 2008, at 4:20 PM, Sebastian Andrzej Siewior wrote:


From: Sebastian Siewior [EMAIL PROTECTED]

Some code dtb scanning  filling has been borrowed from ppc64.
The old behavior is still available if compiled with GameCube,
other PowerPC platform use the can purgatory and specify a new
dtb.
The purgatory is disabled because somehting is wrong and I dunno
the reason. Booting a self containd cuImage (incl. dtb / wiuthout
the need for a bd sturct) can be booted.

Signed-off-by: Sebastian Andrzej Siewior [EMAIL PROTECTED]
---
kexec/arch/ppc/Makefile|1 +
kexec/arch/ppc/kexec-elf-ppc.c |  167 ++
kexec/arch/ppc/kexec-elf-rel-ppc.c |4 +
kexec/arch/ppc/kexec-ppc.c |  469 
+++-

purgatory/arch/ppc/Makefile|1 +
purgatory/arch/ppc/purgatory-ppc.c |4 +
purgatory/arch/ppc/v2wrap.S|   54 
7 files changed, 652 insertions(+), 48 deletions(-)
create mode 100644 purgatory/arch/ppc/v2wrap.S


I think I might have realized some of my confusion.. is this patch to 
the kernel or to some kexec tool?   If its to the kernel I don't answer 
at all.  If its to some kexec tool than that wasn't clear at all.


Patch 1 and 2 were for kernel side support. Patch 3 is kexec userland 
only. I wrote this down in the patch first email (should be 0/3) but now I 
see that git did not enumerate them. Sorry for that, I see that I have to 
work on git skills


The two patches tagged with [RFC] is kernel side support. The third patch 
tagged with [PATCH] is also meant to be [RFC] and is the kexec userland 
part against [1].



[1] git://git.kernel.org/pub/scm/linux/kernel/git/horms/kexec-tools.git


- k


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


RE: [PATCH v2] ibm_newemac: Add support for GPCS, SGMIIandM88E1112 PHY

2008-10-02 Thread Victor Gallardo
 Victor, while at it, can you do a fixup patch on top of it that guards
 the new feature with a Kconfig option like some of the other ones so
 that the code for it doesn't get compiled in when building, for example.
 for 405GP only ?

 The trick is to have the option not be part of the possible mask, so
 that the compiler optimises out the feature tests as if (0) (gcc
 nowadays is supposedly smart enough to rip off the code when it finds
 such constructs).

Hi Ben, 
 
Can you give an example of what you are asking for? I am not sure if I 
understand your request.
 
Thanks,
 
Victor Gallardo
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

RE: [PATCH v2] ibm_newemac: Add support for GPCS, SGMIIandM88E1112 PHY

2008-10-02 Thread Benjamin Herrenschmidt
On Thu, 2008-10-02 at 06:40 -0700, Victor Gallardo wrote:
  Victor, while at it, can you do a fixup patch on top of it that guards
  the new feature with a Kconfig option like some of the other ones so
  that the code for it doesn't get compiled in when building, for example.
  for 405GP only ?
 
  The trick is to have the option not be part of the possible mask, so
  that the compiler optimises out the feature tests as if (0) (gcc
  nowadays is supposedly smart enough to rip off the code when it finds
  such constructs).
 
 Hi Ben, 
  
 Can you give an example of what you are asking for? I am not sure if I 
 understand your request.

Well, if you look at the way emac_has_feature is implemented:

static inline int emac_has_feature(struct emac_instance *dev,
   unsigned long feature)
{
return (EMAC_FTRS_ALWAYS  feature) ||
   (EMAC_FTRS_POSSIBLE  dev-features  feature);
}

And now, if you look a few lines up, you see that various CONFIG_*
options define what is in EMAC_FTRS_POSSIBLE.

The trick is, you can thus make your new option only be part of
EMAC_FTRS_POSSIBLE if support for a 460EX based board has been enabled
or even better, one that uses a GPCS PHY. You do that by creating a new
Kconfig option such as CONFIG_EMAC_SUPPORTS_GPCS for example that gets
select'ed by the boards that need it.

That way, when compiling a kernel for a board that does -not- need it,
the feature bit will be absent from EMAC_FTRS_POSSIBLE. That will allow
the compiler to figure out that when emac_has_feature() is called for
that option, the result will always be 0. Thus the compiler gets to
optimize out all the code relative to that option.

Cheers,
Ben.


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


Re: libfdt: Add function to explicitly expand aliases

2008-10-02 Thread Jon Loeliger
 Kumar has already added alias expansion to fdt_path_offset().
 However, in some circumstances it may be convenient for the user of
 libfdt to explicitly get the string expansion of an alias.  This patch
 adds a function to do this, fdt_get_alias(), and uses it to implement
 fdt_path_offset().
 
 Signed-off-by: David Gibson [EMAIL PROTECTED]

Applied.

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


[PATCH] powerpc/83xx: don't probe broken PCI on mpc837x_mds boards

2008-10-02 Thread Anton Vorontsov
In the standalone setup the board's CPLD disables the PCI internal
arbiter, thus any access to the PCI bus will hang the board.

When there is no PCI arbiter on the bus the u-boot marks the PCI
bus as broken and we should not try to probe it.

Signed-off-by: Anton Vorontsov [EMAIL PROTECTED]
---
 arch/powerpc/platforms/83xx/mpc837x_mds.c |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c 
b/arch/powerpc/platforms/83xx/mpc837x_mds.c
index be62de2..8bb13c8 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c
@@ -85,8 +85,14 @@ static void __init mpc837x_mds_setup_arch(void)
ppc_md.progress(mpc837x_mds_setup_arch(), 0);
 
 #ifdef CONFIG_PCI
-   for_each_compatible_node(np, pci, fsl,mpc8349-pci)
+   for_each_compatible_node(np, pci, fsl,mpc8349-pci) {
+   if (!of_device_is_available(np)) {
+   pr_warning(%s: disabled by the firmware.\n,
+  np-full_name);
+   continue;
+   }
mpc83xx_add_bridge(np);
+   }
 #endif
mpc837xmds_usb_cfg();
 }
-- 
1.5.6.3
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH REPOST] powerpc: iSeries: remove unused variable in viodasd.c

2008-10-02 Thread Johann Felix Soden
From: Johann Felix Soden [EMAIL PROTECTED]

The variable statindex in send_request is never read, so remove it.

Signed-off-by: Johann Felix Soden [EMAIL PROTECTED]
CC: Stephen Rothwell [EMAIL PROTECTED]
---
now CC to [EMAIL PROTECTED]

 drivers/block/viodasd.c |3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c
index f1c8feb..1730d29 100644
--- a/drivers/block/viodasd.c
+++ b/drivers/block/viodasd.c
@@ -249,7 +249,6 @@ static int send_request(struct request *req)
struct HvLpEvent *hev;
struct scatterlist sg[VIOMAXBLOCKDMA];
int sgindex;
-   int statindex;
struct viodasd_device *d;
unsigned long flags;
 
@@ -258,11 +257,9 @@ static int send_request(struct request *req)
if (rq_data_dir(req) == READ) {
direction = DMA_FROM_DEVICE;
viocmd = viomajorsubtype_blockio | vioblockread;
-   statindex = 0;
} else {
direction = DMA_TO_DEVICE;
viocmd = viomajorsubtype_blockio | vioblockwrite;
-   statindex = 1;
}
 
 d = req-rq_disk-private_data;
-- 
1.5.6.5

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


usb advice using scc4 on mpc8270

2008-10-02 Thread Simon Christian
Hi, has anyone on the list implemented or know anyone who has
implemented the on chip usb functionality (using SCC4) on the 8270
processor? particularly with a 2.6 linux kernel?

any advice would be gratefully received.

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


Re: [PATCH]ppc4xx-Walnut: fixes early boot messages

2008-10-02 Thread Niklaus Giger
Am Donnerstag 02 Oktober 2008 08.39:54 schrieb David Gibson:
 On Thu, Oct 02, 2008 at 07:36:40AM +0200, Niklaus Giger wrote:
  Inherits the baudrate from U-boot to print things like:
  Using Walnut machine description
  Linux version ..
  console [udbg0] enabled

 Uh.. but what if you're booting from cuboot or openbios, rather than a
 device-tree-aware uboot.
Sorry. I forgot that you can have other boot-eprom beside U-Boot. I will try 
to fix that in my u-boot configuration.

Best regards

Niklaus

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


Re: [PATCH] Added preliminary support for Netstal HCU4 board

2008-10-02 Thread Niklaus Giger
Am Donnerstag 02 Oktober 2008 08.41:56 schrieb David Gibson:
 On Thu, Oct 02, 2008 at 07:12:14AM +0200, Niklaus Giger wrote:
  Hi David
 
  Am Donnerstag 02 Oktober 2008 02.52:08 schrieb David Gibson:
   That will work, but will lose comments, references, and other
   formatting, because it essentially compiles then decompiles the tree.
   You probably don't want to do that.  There's also an explicit
   conversion program, convert-dtsv0, which will preserve that
   not-significant-to-output, but useful for the reader information.
 
  Thanks for providing me the hint. Using it, would surely  have been
  easier than adding manually the comment again. However I using the search
  dtc dts-v1 syntax conversion script didn't give me any hint and even in
  the the current  http://www.jdl.com/software/dtc.git I find no word in
  the Documentation about convert-dtsv0.
 
  Neither does it get installed when calling make install.

 Ah, yes, that's a bug.

  Therefore I would suggest you to add a small remark like this:
 
  convert-dtsv0 is a small utility program which converts (DTS)
  Device Tree Source from the obsolete version 0 to version 1. Version 1
  DTS files are marked by line /dts-v1/; at the top of the file.

 Add this remark where, though?
Add a small chapter IV Utilities in your Documentation/manual.txt.

And if the http://www.jdl.com/git_repos/ would work again, I think the spiders 
would pick it up from there.

Best regards

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


Re: [PATCH] Added preliminary support for Netstal HCU4 board

2008-10-02 Thread Jon Loeliger
On Thu, 2008-10-02 at 21:08 +0200, Niklaus Giger wrote:

   convert-dtsv0 is a small utility program which converts (DTS)
   Device Tree Source from the obsolete version 0 to version 1. Version 1
   DTS files are marked by line /dts-v1/; at the top of the file.
 
  Add this remark where, though?
 Add a small chapter IV Utilities in your Documentation/manual.txt.

Patches welcome, of course. :-)

 And if the http://www.jdl.com/git_repos/ would work again, I think the 
 spiders 
 would pick it up from there.


I fetched http://www.jdl.com/software/dtc.git through
my firewall at work just this morning.  What problem
are you seeing?  Are you unable to clone
git://git.jdl.com/software/dtc/git ?

jdl



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


Re: [PATCH] powerpc/83xx: don't probe broken PCI on mpc837x_mds boards

2008-10-02 Thread Kumar Gala


On Oct 2, 2008, at 10:18 AM, Anton Vorontsov wrote:


In the standalone setup the board's CPLD disables the PCI internal
arbiter, thus any access to the PCI bus will hang the board.

When there is no PCI arbiter on the bus the u-boot marks the PCI
bus as broken and we should not try to probe it.

Signed-off-by: Anton Vorontsov [EMAIL PROTECTED]


Can you add to the commit message something about using the 'status  
field in the device tree to determine if the pci controller is  
available'


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


Re: [PATCH] Added preliminary support for Netstal HCU4 board

2008-10-02 Thread Niklaus Giger
Am Donnerstag 02 Oktober 2008 21.37:00 schrieb Jon Loeliger:
 On Thu, 2008-10-02 at 21:08 +0200, Niklaus Giger wrote:
convert-dtsv0 is a small utility program which converts (DTS)
Device Tree Source from the obsolete version 0 to version 1. Version
1 DTS files are marked by line /dts-v1/; at the top of the file.
  
   Add this remark where, though?
 
  Add a small chapter IV Utilities in your Documentation/manual.txt.

 Patches welcome, of course. :-)

  And if the http://www.jdl.com/git_repos/ would work again, I think the
  spiders would pick it up from there.

 I fetched http://www.jdl.com/software/dtc.git through
 my firewall at work just this morning.  What problem
 are you seeing?  Are you unable to clone
 git://git.jdl.com/software/dtc/git ?

 jdl
git pull worked perfectly. But in Documentation/manual.txt you promise:
 -- The gitweb interface is:

 http://www.jdl.com/git_repos/
And this link does not work.

Best regards.

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


[PATCH] Install document convert-dtsv0

2008-10-02 Thread Niklaus Giger
Patch against http://www.jdl.com/software/dtc.git
Signed-off-by: Niklaus Giger [EMAIL PROTECTED]
---
 Documentation/manual.txt |   20 
 Makefile |1 +
 2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/Documentation/manual.txt b/Documentation/manual.txt
index b957662..0674384 100644
--- a/Documentation/manual.txt
+++ b/Documentation/manual.txt
@@ -19,6 +19,8 @@ II - The DT block format
 
 III - libfdt
 
+IV - Conversion to Version 1
+
 
 I - dtc, the device tree compiler
 ===
@@ -613,6 +615,24 @@ strings block.
 
 
 III - libfdt
+
 
 This library should be merged into dtc proper.
 This library should likely be worked into U-Boot and the kernel.
+
+IV - Conversion to Version 1
+
+
+convert-dtsv0 is a small utility program which converts (DTS)
+Device Tree Source from the obsolete version 0 to version 1.
+
+Version 1 DTS files are marked by line /dts-v1/; at the top of the file.
+
+The syntax of the convert-dtsv0 command line is:
+
+convert-dtsv0 [input_filename ... ]
+
+Each file passed will be converted to the new /dts-v1/ version by creating
+a new file with a v1 appended the filename.
+
+Comments, empty lines, etc. are preserved.
diff --git a/Makefile b/Makefile
index 5ad0189..558e10c 100644
--- a/Makefile
+++ b/Makefile
@@ -52,6 +52,7 @@ install: all
@$(VECHO) INSTALL
$(INSTALL) -d $(DESTDIR)$(BINDIR)
$(INSTALL) -m 755 dtc $(DESTDIR)$(BINDIR)
+   $(INSTALL) -m 755 convert-dtsv0 $(DESTDIR)$(BINDIR)
$(INSTALL) -d $(DESTDIR)$(LIBDIR)
$(INSTALL) -m 644 $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)
$(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
-- 
1.6.0.1


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


Updated 4xx 'next' branch

2008-10-02 Thread Josh Boyer
Hi All,

I've updated my 'next' branch again.  For those that are tracking
it, you might need to force a pull as I had to rework the branch
a bit.  The following commits have been added:

Josh Boyer (3):
  ibm_newemac: Allow the no flow control EMAC feature to work
  ibm_newemac: Introduce mal_has_feature
  ibm_newemac: MAL support for PowerPC 405EZ

Matthias Fuchs (1):
  powerpc/4xx: Allow 4xx PCI bridge to be disabled via device tree

Victor Gallardo (4):
  ibm_newemac: Add support for GPCS, SGMII and M88E1112 PHY
  powerpc/44x: Add AMCC Arches eval board support
  powerpc/44x: Add AMCC Arches DTS
  powerpc/44x: Add AMCC Arches defconfig file

I'll let it sit for a day or so, and then ask Ben to pull.

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


Re: [PATCH] Added preliminary support for Netstal HCU4 board

2008-10-02 Thread Jon Loeliger
On Thu, 2008-10-02 at 21:51 +0200, Niklaus Giger wrote:

 git pull worked perfectly. But in Documentation/manual.txt you promise:
  -- The gitweb interface is:
 
  http://www.jdl.com/git_repos/
 And this link does not work.

Gah.  Thanks.

jdl


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


Re: [PATCH] properly reserve in bootmem the lmb reserved regions that cross numa nodes

2008-10-02 Thread Jon Tollefson
Adam Litke wrote:
 This seems like the right approach to me.  I have pointed out a few
 stylistic issues below.
   
Thanks.  I'll make those changes.  I assume by __mminit you meant __meminit

Jon

 On Tue, 2008-09-30 at 09:53 -0500, Jon Tollefson wrote:
 snip
   
 +/* Mark reserved regions */
 +for (i = 0; i  lmb.reserved.cnt; i++) {
 +unsigned long physbase = lmb.reserved.region[i].base;
 +unsigned long size = lmb.reserved.region[i].size;
 +unsigned long start_pfn = physbase  PAGE_SHIFT;
 +unsigned long end_pfn = ((physbase+size-1)  PAGE_SHIFT);
 

 CodingStyle dictates that this should be:
 unsigned long end_pfn = ((physbase + size - 1)  PAGE_SHIFT);

 snip

   
 +/**
 + * get_node_active_region - Return active region containing start_pfn
 + * @start_pfn The page to return the region for.
 + *
 + * It will return NULL if active region is not found.
 + */
 +struct node_active_region *get_node_active_region(
 +unsigned long start_pfn)
 

 Bad style.  I think the convention would be to write it like this:

 struct node_active_region *
 get_node_active_region(unsigned long start_pfn)

   
 +{
 +int i;
 +for (i = 0; i  nr_nodemap_entries; i++) {
 +unsigned long node_start_pfn = early_node_map[i].start_pfn;
 +unsigned long node_end_pfn = early_node_map[i].end_pfn;
 +
 +if (node_start_pfn = start_pfn  node_end_pfn  start_pfn)
 +return early_node_map[i];
 +}
 +return NULL;
 +}
 

 Since this is using the early_node_map[], should we mark the function
 __mminit?  

   

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


[PATCH] powerpc: make Freescale QE support a selectable Kconfig option

2008-10-02 Thread Timur Tabi
Modify the Kconfig so that Freescale QUICC Engine (QE) support is a selectable
option, thereby allowing users to compile kernels without any QE support.

The drawback is that QE support is now disabled by default on platforms that
have a QE, and so a defconfig is needed to enable QE and QE devices (like
UCC GETH).  Fortunately, all the current relevant defconfigs do that already.

Signed-off-by: Timur Tabi [EMAIL PROTECTED]
---

This patch should be applied to Kumar's branch for 2.6.28 patches.

 arch/powerpc/platforms/83xx/Kconfig |4 
 arch/powerpc/platforms/Kconfig  |3 ++-
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/platforms/83xx/Kconfig 
b/arch/powerpc/platforms/83xx/Kconfig
index 6159c5d..4a6cc78 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -19,7 +19,6 @@ config MPC831x_RDB
 config MPC832x_MDS
bool Freescale MPC832x MDS
select DEFAULT_UIMAGE
-   select QUICC_ENGINE
select PPC_MPC832x
help
  This option enables support for the MPC832x MDS evaluation board.
@@ -27,7 +26,6 @@ config MPC832x_MDS
 config MPC832x_RDB
bool Freescale MPC832x RDB
select DEFAULT_UIMAGE
-   select QUICC_ENGINE
select PPC_MPC832x
help
  This option enables support for the MPC8323 RDB board.
@@ -57,14 +55,12 @@ config MPC834x_ITX
 config MPC836x_MDS
bool Freescale MPC836x MDS
select DEFAULT_UIMAGE
-   select QUICC_ENGINE
help
  This option enables support for the MPC836x MDS Processor Board.
 
 config MPC836x_RDK
bool Freescale/Logic MPC836x RDK
select DEFAULT_UIMAGE
-   select QUICC_ENGINE
select QE_GPIO
select FSL_GTM
select FSL_LBC
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 9578c45..6cf517f 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -239,7 +239,8 @@ config TAU_AVERAGE
  If in doubt, say N here.
 
 config QUICC_ENGINE
-   bool
+   bool Freescale QUICC Engine (QE) Support
+   depends on FSL_SOC
select PPC_LIB_RHEAP
select CRC32
help
-- 
1.5.5

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


[PATCH] powerpc: Simple platform for the ISS 4xx simulator

2008-10-02 Thread Benjamin Herrenschmidt
This is a trivial 4xx plaform that uses the new simple bsp from
Josh and is handy to use in simulators such as ISS or even Mambo
who don't properly implement most of the actual devices in the
SoC but really only the core.

Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED]
---

 arch/powerpc/boot/Makefile |7 
 arch/powerpc/boot/dts/iss4xx.dts   |  107 +++
 arch/powerpc/boot/treeboot-iss4xx.c|   54 +
 arch/powerpc/configs/44x/iss4xx_defconfig  |  827 +
 arch/powerpc/platforms/44x/Kconfig |   11 
 arch/powerpc/platforms/44x/ppc44x_simple.c |3 
 6 files changed, 1006 insertions(+), 3 deletions(-)

--- linux-work.orig/arch/powerpc/boot/Makefile  2008-10-02 15:45:47.0 
+1000
+++ linux-work/arch/powerpc/boot/Makefile   2008-10-02 15:46:11.0 
+1000
@@ -42,6 +42,7 @@ $(obj)/ebony.o: BOOTCFLAGS += -mcpu=405
 $(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=405
 $(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405
 $(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405
+$(obj)/treeboot-iss4xx.o: BOOTCFLAGS += -mcpu=405
 $(obj)/virtex405-head.o: BOOTAFLAGS += -mcpu=405
 
 
@@ -68,7 +69,8 @@ src-plat := of.c cuboot-52xx.c cuboot-82
fixed-head.S ep88xc.c ep405.c cuboot-c2k.c \
cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \
cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c 
\
-   virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c
+   virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \
+   treeboot-iss4xx.c
 src-boot := $(src-wlib) $(src-plat) empty.c
 
 src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -221,7 +223,8 @@ image-$(CONFIG_RAINIER) += cuImage.rai
 image-$(CONFIG_TAISHAN)+= cuImage.taishan
 image-$(CONFIG_KATMAI) += cuImage.katmai
 image-$(CONFIG_WARP)   += cuImage.warp
-image-$(CONFIG_YOSEMITE)   += cuImage.yosemite
+image-$(CONFIG_YOSEMITE)   += cuImage.yosemit
+image-$(CONFIG_ISS4xx) += treeImage.iss4xx
 
 # Board ports in arch/powerpc/platform/8xx/Kconfig
 image-$(CONFIG_MPC86XADS)  += cuImage.mpc866ads
Index: linux-work/arch/powerpc/boot/dts/iss4xx.dts
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ linux-work/arch/powerpc/boot/dts/iss4xx.dts 2008-10-02 15:46:11.0 
+1000
@@ -0,0 +1,107 @@
+/*
+ * Device Tree Source for IBM Ebony
+ *
+ * Copyright (c) 2006, 2007 IBM Corp.
+ * Josh Boyer [EMAIL PROTECTED], David Gibson [EMAIL PROTECTED]
+ *
+ * FIXME: Draft only!
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed as is without
+ * any warranty of any kind, whether express or implied.
+ */
+
+/dts-v1/;
+
+/ {
+   #address-cells = 2;
+   #size-cells = 1;
+   model = ibm,iss-4xx;
+   compatible = ibm,iss-4xx;
+   dcr-parent = {/cpus/[EMAIL PROTECTED];
+
+   aliases {
+   serial0 = UART0;
+   };
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   [EMAIL PROTECTED] {
+   device_type = cpu;
+   model = PowerPC,4xx; // real CPU changed in sim
+   reg = 0x;
+   clock-frequency = 1; // 100Mhz :-)
+   timebase-frequency = 1;
+   i-cache-line-size = 32; // may need fixup in sim
+   d-cache-line-size = 32; // may need fixup in sim
+   i-cache-size = 32768; /* may need fixup in sim */
+   d-cache-size = 32768; /* may need fixup in sim */
+   dcr-controller;
+   dcr-access-method = native;
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x 0x 0x; // Filled in by zImage
+   };
+
+   UIC0: interrupt-controller0 {
+   compatible = ibm,uic-4xx, ibm,uic;
+   interrupt-controller;
+   cell-index = 0;
+   dcr-reg = 0x0c0 0x009;
+   #address-cells = 0;
+   #size-cells = 0;
+   #interrupt-cells = 2;
+
+   };
+
+   UIC1: interrupt-controller1 {
+   compatible = ibm,uic-4xx, ibm,uic;
+   interrupt-controller;
+   cell-index = 1;
+   dcr-reg = 0x0d0 0x009;
+   #address-cells = 0;
+   #size-cells = 0;
+   #interrupt-cells = 2;
+   interrupts = 0x1e 0x4 0x1f 0x4; /* cascade */
+   interrupt-parent = UIC0;
+   };
+
+   plb {
+   compatible = ibm,plb-4xx, ibm,plb4; /* Could be PLB6, 
doesn't matter */
+

[RFC/PATCH] Block device for the ISS simulator

2008-10-02 Thread Benjamin Herrenschmidt
The ISS simulator is a simple powerpc simulator used among other things
for hardware bringup. It implements a simple memory mapped block device
interface.

This is a simple block driver that attaches to it. Note that the choice
of a major device number is fishy, though because it's a simulator and
not real hardware, it's not necessarily a big deal.

Comments welcome,

Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED]
---

(And yes, I will try to get ISS to implement an IDE emulation instead
but that's not what's there at this stage)

 arch/powerpc/boot/dts/iss4xx.dts |5 
 drivers/block/Kconfig|4 
 drivers/block/Makefile   |1 
 drivers/block/iss_blk.c  |  365 +++
 4 files changed, 375 insertions(+)

--- /dev/null   1970-01-01 00:00:00.0 +
+++ linux-work/drivers/block/iss_blk.c  2008-09-23 11:12:03.0 +1000
@@ -0,0 +1,365 @@
+/*
+ * Simple block device for the ISS simulator
+ */
+
+#undef DEBUG
+
+#include linux/major.h
+#include linux/kernel.h
+#include linux/module.h
+#include linux/init.h
+#include linux/sched.h
+#include linux/fs.h
+#include linux/errno.h
+#include linux/file.h
+#include linux/ioctl.h
+#include linux/blkdev.h
+#include linux/of.h
+
+#include asm/io.h
+
+#define MAJOR_NR   63  /* FIXME */
+#define NUM_ISS_BLK_MINOR  4
+
+/* Command codes */
+enum {
+   ISS_BD_CMD_NOP  = 0,
+   ISS_BD_CMD_OPEN = 1,
+   ISS_BD_CMD_CLOSE= 2,
+   ISS_BD_CMD_READ = 3,
+   ISS_BD_CMD_WRITE= 4,
+   ISS_BD_CMD_STATUS   = 5,
+   ISS_BD_CMD_CHKCHANGE= 6,
+   ISS_BD_CMD_SYNC = 7,
+   ISS_BD_CMD_GET_BLKSIZE  = 8,
+   ISS_BD_CMD_GET_DEVSIZE  = 9,
+};
+
+/* Status codes */
+enum {
+   ISS_BD_STATUS_OK= 0,
+   ISS_BD_STATUS_OP_ER = 1,/* Open error  
*/
+   ISS_BD_ALREADY_OPEN = 2,/* Block file already open 
*/
+   ISS_BD_NOT_OPEN = 3,/* Block file not open 
*/
+   ISS_BD_BAD_DEV_NUM  = 4,/* Bad device number   
*/
+   ISS_BD_BAD_SEC_CNT  = 5,/* Bad sector number   
*/
+   ISS_BD_SEEK_ERROR   = 6,/* Bad sector count
*/
+   ISS_BD_RW_ERROR = 7,/* Read/Write error
*/
+   ISS_BD_SIZE_ERROR   = 8,/* Unable to determine file size   
*/
+};
+
+struct iss_blk_regs {
+   u8  cmd;
+   u8  pad0[3];
+   u32 stat;
+   u32 sector;
+   u32 count;
+   u32 devno;
+   u32 size;
+   u8  pad1[0x1e8];
+   u8  data[0x800];
+};
+
+struct iss_blk {
+   struct gendisk  *disk;
+   unsigned intdevno;
+   unsigned intsectsize;
+   unsigned intcapacity;
+   unsigned intpresent;
+   unsigned intchanged;
+} iss_blks[NUM_ISS_BLK_MINOR];
+
+static spinlock_t  iss_blk_qlock;
+static spinlock_t  iss_blk_reglock;
+static struct iss_blk_regs __iomem *iss_blk_regs;
+
+static void iss_blk_setup(struct iss_blk *ib)
+{
+   unsigned long flags;
+   u32 stat;
+
+   pr_debug(iss_blk_setup %d\n, ib-devno);
+
+   spin_lock_irqsave(iss_blk_reglock, flags);
+   out_8(iss_blk_regs-data, 0);
+   out_be32(iss_blk_regs-devno, ib-devno);
+   out_8(iss_blk_regs-cmd, ISS_BD_CMD_OPEN);
+   stat = in_be32(iss_blk_regs-stat);
+   if (stat != ISS_BD_STATUS_OK) {
+   pr_debug( - no file\n);
+   goto failed;
+   }
+   out_8(iss_blk_regs-cmd, ISS_BD_CMD_GET_BLKSIZE);
+   ib-sectsize = in_be32(iss_blk_regs-size);
+   if (ib-sectsize != 512) {
+   pr_err(issblk: unsupported sector size %d\n, ib-sectsize);
+   goto failed;
+   }
+   out_8(iss_blk_regs-cmd, ISS_BD_CMD_GET_DEVSIZE);
+   ib-capacity = in_be32(iss_blk_regs-size);
+   ib-present = 1;
+   ib-changed = 0;
+   spin_unlock_irqrestore(iss_blk_reglock, flags);
+
+   pr_debug( - 0x%x sectors 0f %d bytes\n,
+ib-capacity, ib-sectsize);
+
+   blk_queue_bounce_limit(ib-disk-queue, BLK_BOUNCE_HIGH);
+   blk_queue_hardsect_size(ib-disk-queue, ib-sectsize);
+   set_capacity(ib-disk, ib-capacity);
+   return;
+
+ failed:
+   spin_unlock_irqrestore(iss_blk_reglock, flags);
+}
+
+static int __iss_blk_read(struct iss_blk *ib, void *buffer,
+ unsigned long sector, unsigned long count)
+{
+   unsigned long lcount, flags;
+   u32 stat;
+
+   pr_debug(__iss_blk_read 0x%ld sectors @ 0x%lx\n, count, sector);
+
+   while(count) {
+   lcount = min(count, 4ul);
+   spin_lock_irqsave(iss_blk_reglock, flags);
+   out_be32(iss_blk_regs-devno, ib-devno);
+ 

[PATCH] powerpc: Fix domain numbers in /proc on 64-bit

2008-10-02 Thread Benjamin Herrenschmidt
The code to properly expose domain numbers in /proc is somewhat
bogus on ppc64 as it depends on the buid field being non-0,
but that field is really pseries specific.

This removes that code and makes ppc64 use the same code as 32-bit
which effectively decides whether to expose domains based on
ppc_pci_flags set by the platform, and sets the default for 64-bit
to enable domains and enable compatibility for domain 0 (which
strips the domain number for domain 0 to help with X servers).

Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED]
---

 arch/powerpc/kernel/pci-common.c |   10 --
 arch/powerpc/kernel/pci_64.c |5 +
 2 files changed, 9 insertions(+), 6 deletions(-)

--- linux-work.orig/arch/powerpc/kernel/pci-common.c2008-09-09 
16:31:13.0 +1000
+++ linux-work/arch/powerpc/kernel/pci-common.c 2008-09-09 16:31:15.0 
+1000
@@ -53,8 +53,9 @@ static int global_phb_number; /* Global
 /* ISA Memory physical address */
 resource_size_t isa_mem_base;
 
-/* Default PCI flags is 0 */
-unsigned int ppc_pci_flags;
+/* Default PCI flags is 0 on ppc32, modified at boot on ppc64 */
+unsigned int ppc_pci_flags = 0;
+
 
 struct pci_controller *pcibios_alloc_controller(struct device_node *dev)
 {
@@ -669,15 +670,12 @@ void __devinit pci_process_bridge_OF_ran
 int pci_proc_domain(struct pci_bus *bus)
 {
struct pci_controller *hose = pci_bus_to_host(bus);
-#ifdef CONFIG_PPC64
-   return hose-buid != 0;
-#else
+
if (!(ppc_pci_flags  PPC_PCI_ENABLE_PROC_DOMAINS))
return 0;
if (ppc_pci_flags  PPC_PCI_COMPAT_DOMAIN_0)
return hose-global_number != 0;
return 1;
-#endif
 }
 
 void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region 
*region,
Index: linux-work/arch/powerpc/kernel/pci_64.c
===
--- linux-work.orig/arch/powerpc/kernel/pci_64.c2008-09-09 
16:31:39.0 +1000
+++ linux-work/arch/powerpc/kernel/pci_64.c 2008-09-09 16:31:45.0 
+1000
@@ -417,6 +417,11 @@ static int __init pcibios_init(void)
if (pci_probe_only)
ppc_pci_flags |= PPC_PCI_PROBE_ONLY;
 
+   /* On ppc64, we always enable PCI domains and we keep domain 0
+* backward compatible in /proc for video cards
+*/
+   ppc_pci_flags |= PPC_PCI_ENABLE_PROC_DOMAINS | PPC_PCI_COMPAT_DOMAIN_0;
+
/* Scan all of the recorded PCI controllers.  */
list_for_each_entry_safe(hose, tmp, hose_list, list_node) {
scan_phb(hose);
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] Install document convert-dtsv0

2008-10-02 Thread David Gibson
On Thu, Oct 02, 2008 at 10:06:35PM +0200, Niklaus Giger wrote:
 Patch against http://www.jdl.com/software/dtc.git
 Signed-off-by: Niklaus Giger [EMAIL PROTECTED]

Thanks.

Acked-by: David Gibson [EMAIL PROTECTED]

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] powerpc: Simple platform for the ISS 4xx simulator

2008-10-02 Thread Sean MacLennan
On Fri, 03 Oct 2008 10:07:19 +1000
Benjamin Herrenschmidt [EMAIL PROTECTED] wrote:

  image-$(CONFIG_WARP) += cuImage.warp
 -image-$(CONFIG_YOSEMITE) += cuImage.yosemite
 +image-$(CONFIG_YOSEMITE) += cuImage.yosemit

Did you really mean to drop the e from yosemite?

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


Re: [PATCH] powerpc: Simple platform for the ISS 4xx simulator

2008-10-02 Thread Benjamin Herrenschmidt
On Thu, 2008-10-02 at 21:02 -0400, Sean MacLennan wrote:
 On Fri, 03 Oct 2008 10:07:19 +1000
 Benjamin Herrenschmidt [EMAIL PROTECTED] wrote:
 
   image-$(CONFIG_WARP)   += cuImage.warp
  -image-$(CONFIG_YOSEMITE)   += cuImage.yosemite
  +image-$(CONFIG_YOSEMITE)   += cuImage.yosemit
 
 Did you really mean to drop the e from yosemite?

Nope :-) Thanks for catching this.

Cheers,
Ben.


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


Re: [RFC/PATCH] Block device for the ISS simulator

2008-10-02 Thread Andi Kleen
Benjamin Herrenschmidt [EMAIL PROTECTED] writes:

 The ISS simulator is a simple powerpc simulator used among other things
 for hardware bringup. It implements a simple memory mapped block device
 interface.

...

 --- /dev/null 1970-01-01 00:00:00.0 +
 +++ linux-work/drivers/block/iss_blk.c2008-09-23 11:12:03.0 
 +1000
 @@ -0,0 +1,365 @@
 +/*
 + * Simple block device for the ISS simulator
 + */

The first paragraph in your description above should be in this comment.

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


Re: [PATCH] powerpc: make Freescale QE support a selectable Kconfig option

2008-10-02 Thread Kumar Gala


On Oct 2, 2008, at 10:27 AM, Timur Tabi wrote:

Modify the Kconfig so that Freescale QUICC Engine (QE) support is a  
selectable
option, thereby allowing users to compile kernels without any QE  
support.


The drawback is that QE support is now disabled by default on  
platforms that
have a QE, and so a defconfig is needed to enable QE and QE devices  
(like
UCC GETH).  Fortunately, all the current relevant defconfigs do that  
already.


Signed-off-by: Timur Tabi [EMAIL PROTECTED]
---

This patch should be applied to Kumar's branch for 2.6.28 patches.

arch/powerpc/platforms/83xx/Kconfig |4 
arch/powerpc/platforms/Kconfig  |3 ++-
2 files changed, 2 insertions(+), 5 deletions(-)


What about the 85xx/Kconfig users?

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


Re: [PATCH] powerpc: dtb and purgatory support for ppc32

2008-10-02 Thread Mohan Kumar M

Simon Horman wrote:

On Thu, Oct 02, 2008 at 09:50:16AM +0200, Sebastian Siewior wrote:




I'm not speaking on behalf of Kumar Gala, just on behalf of myself.



Hi Horms,


I would like to get some review of this patch by if possible.
Also, I'm a little unclear of how it will interact with the
patches that Mohan Kumar sent this week. But at this point
I don't see any particular need to break the patch up into
smaller pieices.



My patches are meant for PPC64 only. The patch implements support for 
relocatable kdump kernel on PPC64 platform.


So I don't think Sebastian's patches need to support this relocation 
support in the kexec-tools as of now.


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