LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* MPC5200b external interrupt registration problem
From: Nick @ 2008-05-09 18:49 UTC (permalink / raw)
  To: linuxppc-dev

Hi,

I am writing a driver to service an interrupt from our fpga.  I am calling request_irq in the open
function of my driver.  The fpga is connected to external interrupt 1.  I am using interrupt
number 65 in the request_irq but the function is failing.  I traced to a function called setup_irq
in file /kernel/irq/manage.c.  It fails because at this line: if (desc->chip == &no_irq_chip) . 
Is 65 the wrong interrupt number?  What do I need to do to properly setup for external interrupts?

Thanks for any help,

Nick

^ permalink raw reply

* Re: MPC5200b external interrupt registration problem
From: Scott Wood @ 2008-05-09 19:02 UTC (permalink / raw)
  To: Nick; +Cc: linuxppc-dev
In-Reply-To: <169407.5661.qm@web88102.mail.re2.yahoo.com>

On Fri, May 09, 2008 at 02:49:04PM -0400, Nick wrote:
> I am writing a driver to service an interrupt from our fpga.  I am calling request_irq in the open
> function of my driver.  The fpga is connected to external interrupt 1.  I am using interrupt
> number 65 in the request_irq but the function is failing.

request_irq takes a virtual IRQ number, not a hardware IRQ number.  You
need to get the virtual IRQ number from irq_of_parse_and_map(), or from
irq_create_mapping().

This would probably confuse far fewer people if we used pointers in the
API rather than virtual IRQ numbers...

-Scott

^ permalink raw reply

* Re: patch to install unstripped vDSO on disk breaks powerpc kernel build
From: Roland McGrath @ 2008-05-09 19:44 UTC (permalink / raw)
  To: Chris Friesen; +Cc: linuxppc-dev, paulus
In-Reply-To: <482486F7.3090805@nortel.com>

I haven't seen that error before.  Can you show the output of {eu-,}readelf -lS
on vdso64.so.dbg, and also on the vdso64.so successfully built when you
revert the patch?


Thanks,
Roland

^ permalink raw reply

* Re: MPC5200b MMC over SPI into PSC6
From: Fabri @ 2008-05-09 20:01 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, Fabio Tosetto
In-Reply-To: <fa686aa40805090820s66801309j161adfcbc360fc42@mail.gmail.com>

Nice to hear that, next week I'll try and let you know.

Thank you again for your support,
Fabrizio

On Fri, May 9, 2008 at 5:20 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Fri, May 9, 2008 at 9:02 AM, Fabri <rider4ever@gmail.com> wrote:
>> Thanks for the patches, now some more rows are printed after RamDisk loading:
>>
>>   Verifying Checksum ... OK
>>   Loading Ramdisk to 0fe68000, end 0ff49bf2 ... OK
>> Memory <- <0x0 0x10000000> (256MB)
>> CPU clock-frequency <- 0xbcd3d80 (198MHz)
>> CPU timebase-frequency <- 0x1f78a40 (33MHz)
>> CPU bus-frequency <- 0x7de2900 (132MHz)
>>
>> zImage starting: loaded at 0x00400000 (sp: 0x0ff4a958)
>> Allocating 0x32d410 bytes for kernel ...
>> gunzipping (0x00000000 <- 0x0040d000:0x00730fd4)...done 0x30d150 bytes
>> Using loader supplied ramdisk at 0xfe68000-0xff49bf2
>> initrd head: 0x1f8b0808
>>
>> Linux/PowerPC load:
>                      ^^^^^^^^^^^^^^^^^^
>
> Doesn't look like you are passing a kernel parameters line.  The
> kernel probably is booting, but doesn't know where to output the
> console.  Try adding "console=ttyPSC0,115200".
>
> Cheers,
> g.
>
>>
>
> --
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.
>

^ permalink raw reply

* Re: [PATCH] Sam440ep support
From: Josh Boyer @ 2008-05-09 20:26 UTC (permalink / raw)
  To: Giuseppe Coviello; +Cc: linuxppc-dev
In-Reply-To: <a265241c0805090853s22f572c0t8f17c7ba89efd6aa@mail.gmail.com>

On Fri, 9 May 2008 17:53:47 +0200
"Giuseppe Coviello" <cjg@cruxppc.org> wrote:

> 2008/5/6 Giuseppe Coviello <cjg@cruxppc.org>:
> > I've prepared another path to add the support for the sam440ep;
> > shortly I've merged arch/powerpc/boot/sam440ep.c in
> > arch/powerpc/boot/cuboot-sam440ep.c; I've inserted the code to make
> > the rtc works directly in arch/powerpc/platforms/44x/sam440ep.c (so
> > there isn't any arch/powerpc/sysdev/sam440ep.c anymore), and I've
> > cutted away the nasty hack (dma-mapping.h and memmalloc.c) to make the
> > sound works.
> [cut]
> 
> Sorry for our impatience, but we'll happy to know if this (second)
> version of the patch
> is acceptable, and, of course, what could be the future of this same patch.

It still isn't split up quite as much as I'd like, but I'll review it
over the weekend.  If there is nothing drastically wrong with it, I'll
probably take it for 2.6.27.

If you can provide a useful changelog message, that would be nice.
Otherwise I'll have to make one up myself.  (Like, what is the sam440ep
board?  Who makes it?  What is it's purpose?)

josh

^ permalink raw reply

* RE: mmap problem in device driver and application program.
From: Dave Cogley @ 2008-05-09 20:55 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <BAY138-W36C7249F532D111A1DC508B2D00@phx.gbl>

> Shall I use virt_to_phys? dma_addr is already exactly physical address
> which is used to initiate DMA transfers. 

Is the physical memory outside of the reach of the kernel? If it is
under control of the kernel memory management you will need to ioremap
it. This will return a kernel virtual address which will need to be
converted to a physical address and further convert to a page number.
remap_pfn_range only works on page numbers not physical addresses.

So I guess it would look something like this:

int foo_mmap(struct file* filep, struct vm_area_struct* vma)
{
	unsigned long dma_addr = ioremap(0x03000000);
	unsigned long dma_size = 0x00200000;
	unsigned long pfn;

	// convert the DMA address to page number
	pfn = virt_to_phys(dma_addr) >> PAGE_SHIFT;

	...
}

If you are using memory that is not under the kernel's memory management
you will need to use something other than remap_pfn_range.

Dave

On Thu, 2008-05-08 at 18:42 +0000, MingLiu wrote:
> Dear Dave,
>  
> Thanks for your answer first. However I am very confused. It seems
> that I understand the memory-mapping-related functions completely
> wrong. Here comes more questions. 
> 
> 
> > The address you are passing to mmap is where the pointer will be
> mapped
> > in virtual address space. You need to determine the DMA memory
> address
> > page number down in the actual mmap call.
> > 
> > int foo_mmap(struct file* filep, struct vm_area_struct* vma)
> > {
> > unsigned long dma_addr = 0x03000000;
> > unsigned long dma_size = 0x00200000;
> > unsigned long pfn;
> > 
> > // convert the DMA address to page number
> > pfn = virt_to_phys(dma_addr) >> PAGE_SHIFT;
> 
> Shall I use virt_to_phys? dma_addr is already exactly physical address
> which is used to initiate DMA transfers. 
>  
> > // remap our page frame to the vma offset
> > remap_pfn_range(vma, vma->vm_start, pfn, 
> > dma_size, vma->vm_page_prot);
> > }
> > 
> > Change the address parameter from 0x03000000 to 0:
> > 
> > lut_mem_base = (unsigned int *) mmap(0, LUT_SIZE_IN_BYTE, 
> > PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
> 
> Previously I used "remap_page_range(vma, vma->vm_start, physical_addr,
> vm_size, vma->vm_page_prot)" in the device driver, where physical_addr
> is 0x03000000. In the application program, I used "lut_mem_base =
> (unsigned int *) mmap(0, LUT_SIZE_IN_BYTE, PROT_READ | PROT_WRITE,
> MAP_SHARED, fd, 0);". I think it is correct but it doesn't work. I
> heard that in the new kernels, remap_page_range is not supported any
> more. However when I compile the driver, nothing was shown to complain
> that. I am using 2.6.10 kernel. Any hint for this?
>  
> Thank you for your help to make me understand. 
>  
> BR
> Ming
> 
> 
> ______________________________________________________________________
> 使用新一代 Windows Live Messenger 轻松交流和共享! 立即体验!

^ permalink raw reply

* Re: [PATCH] POWERPC: Support ISA legacy addresses in of_address_to_resource()
From: Nate Case @ 2008-05-09 21:31 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev
In-Reply-To: <1210307480.1421.132.camel@pasglop>

On Fri, 2008-05-09 at 14:31 +1000, Benjamin Herrenschmidt wrote:
> I don't understand that fix. Can you tell us more about the exact
> failure mode ? Especially, show us the device-tree bits and the
> addresses returned.
> 
> I suspect the bug is in your device-tree that is forwarding IO
> addresses
> all the way without converting them to memory or something like that.

Your suspicion is correct in a way -- this allows IO port addresses to
make their way to 'struct resource' so that drivers can use inb(),
outb(), etc.  After some thought, I'm not sure if a device tree using
I/O port addresses for a legacy node is considered a bug or not.

Here is the failure case my patch fixes:

        isa@0,e00f0000 {
                linux,phandle = <0x3ff93688>;
                ranges = <0x1 0x0 0x0 0x0 0x1000>;
                reg = <0x0 0xe00f0000 0x0 0x10000>;
                class-code = <0x601ff>;
                device-id = <0xa008>;
                vendor-id = <0x1959>;
                #address-cells = <0x2>;
                #size-cells = <0x1>;
                device_type = "isa";

                ipmi@ca2 {
                        linux,phandle = <0x3ff93a00>;
                        reg = <0x1 0xca2 0x100>;
                        reg-spacing = <0x1>;
                        reg-size = <0x1>;
                        compatible = "ipmi-kcs";
                        device_type = "ipmi";
                };
        };

The address returned for ipmi@ for this case is 0x10ca2 instead of
0xca2.

The legacy "isa" bus node and the device nodes give the raw port
addresses (0xca2 in this case).  In order for this to work, it has to be
assumed that ISA_IO_BASE is mapped properly on the platform so that the
port I/O functions will work with the raw port addresses.

The problem I encountered was that it would call pci_address_to_pio() on
the reg address of the ipmi node just because it had the IORESOURCE_IO
flag.  This would result in the 'struct resource' getting the bogus
address of 0x10ca2 rather than 0xca2.

In my case, my real fix I have settled on is using the following instead
of using the I/O method:

        isa@0,e00f0000 {
                linux,phandle = <0x3ff93688>;
                ranges = <0x0 0x0 0x0 0xfc800000 0x1000>;
                reg = <0x0 0xe00f0000 0x0 0x10000>;
                class-code = <0x601ff>;
                device-id = <0xa008>;
                vendor-id = <0x1959>;
                #address-cells = <0x2>;
                #size-cells = <0x1>;
                device_type = "isa";

                ipmi@ca2 {
                        linux,phandle = <0x3ff93a00>;
                        reg = <0x0 0xca2 0x100>;
                        reg-spacing = <0x1>;
                        reg-size = <0x1>;
                        compatible = "ipmi-kcs";
                        device_type = "ipmi";
                };
        };

That is, the typical MMIO case so that 'struct resource' ends up with
0xfc800ca2.  This works fine without the patch of course.  If legacy I/O
port addresses are not permitted in device trees this way and we don't
want to support it, then you can ignore my patch.  However, it does seem
a little strange to me that __of_address_to_resource() assumes anything
with IORESOURCE_IO is a PCI device.

- Nate Case <ncase@xes-inc.com>

^ permalink raw reply

* [PATCH] Update defconfig for MPC8610 HPCD
From: Timur Tabi @ 2008-05-09 22:06 UTC (permalink / raw)
  To: galak, linuxppc-dev

Update the defconfig for the Freescale MPC8610 HPCD board.  Enable module
support.  Disable support for all NICs except for the on-board ULI526x.
Enable support for the Freescale DIU driver.  Increase the maximum zone order
to 12, so that the DIU driver can allocate physically-contiguous 5MB buffers.

Signed-off-by: Timur Tabi <timur@freescale.com>
---

Support for the Freescale generic DMA driver will have to wait until 2.6.27
because the current audio driver for the 8610 is incompatible with it.

 arch/powerpc/configs/mpc8610_hpcd_defconfig |  306 +++++++++++++++------------
 1 files changed, 174 insertions(+), 132 deletions(-)

diff --git a/arch/powerpc/configs/mpc8610_hpcd_defconfig b/arch/powerpc/configs/mpc8610_hpcd_defconfig
index f9e53bd..761642c 100644
--- a/arch/powerpc/configs/mpc8610_hpcd_defconfig
+++ b/arch/powerpc/configs/mpc8610_hpcd_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.25-rc6
-# Mon Mar 24 08:48:33 2008
+# Linux kernel version: 2.6.26-rc1
+# Fri May  9 16:59:19 2008
 #
 # CONFIG_PPC64 is not set
 
@@ -31,6 +31,8 @@ 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_LOCKDEP_SUPPORT=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_ARCH_HAS_ILOG2_U32=y
 CONFIG_GENERIC_HWEIGHT=y
@@ -86,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
 CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
 CONFIG_SYSCTL_SYSCALL=y
+CONFIG_SYSCTL_SYSCALL_CHECK=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -110,14 +113,22 @@ CONFIG_SLUB=y
 # CONFIG_PROFILING is not set
 # CONFIG_MARKERS is not set
 CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_DMA_ATTRS is not set
 CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
-# CONFIG_MODULES is not set
+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 is not set
 CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
@@ -151,6 +162,7 @@ CONFIG_PPC_86xx=y
 # CONFIG_PPC_CELL_NATIVE is not set
 # CONFIG_PQ2ADS is not set
 # CONFIG_MPC8641_HPCN is not set
+# CONFIG_SBC8641D is not set
 CONFIG_MPC8610_HPCD=y
 CONFIG_MPC8610=y
 # CONFIG_IPIC is not set
@@ -199,11 +211,13 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_FORCE_MAX_ZONEORDER=12
 CONFIG_PROC_DEVICETREE=y
 # CONFIG_CMDLINE_BOOL is not set
 # CONFIG_PM is not set
@@ -223,12 +237,14 @@ CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_SYSCALL=y
 CONFIG_PCIEPORTBUS=y
 CONFIG_PCIEAER=y
+# CONFIG_PCIEASPM is not set
 CONFIG_ARCH_SUPPORTS_MSI=y
 # CONFIG_PCI_MSI is not set
 CONFIG_PCI_LEGACY=y
 CONFIG_PCI_DEBUG=y
 # CONFIG_PCCARD is not set
 # CONFIG_HOTPLUG_PCI is not set
+# CONFIG_HAS_RAPIDIO is not set
 
 #
 # Advanced setup
@@ -238,11 +254,11 @@ CONFIG_PCI_DEBUG=y
 #
 # Default settings for advanced configuration options are used
 #
-CONFIG_HIGHMEM_START=0xfe000000
 CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_PAGE_OFFSET=0xc0000000
 CONFIG_KERNEL_START=0xc0000000
+CONFIG_PHYSICAL_START=0x00000000
 CONFIG_TASK_SIZE=0xc0000000
-CONFIG_BOOT_LOAD=0x00800000
 
 #
 # Networking
@@ -303,8 +319,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=y
 CONFIG_INET6_XFRM_MODE_BEET=y
 # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
 CONFIG_IPV6_SIT=y
+CONFIG_IPV6_NDISC_NODETYPE=y
 # CONFIG_IPV6_TUNNEL is not set
 # CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_IPV6_MROUTE is not set
 # CONFIG_NETWORK_SECMARK is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_IP_DCCP is not set
@@ -360,6 +378,7 @@ CONFIG_FW_LOADER=y
 # CONFIG_CONNECTOR is not set
 # CONFIG_MTD is not set
 CONFIG_OF_DEVICE=y
+CONFIG_OF_I2C=y
 # CONFIG_PARPORT is not set
 CONFIG_BLK_DEV=y
 # CONFIG_BLK_DEV_FD is not set
@@ -418,6 +437,7 @@ CONFIG_CHR_DEV_SG=y
 # CONFIG_SCSI_CONSTANTS is not set
 # CONFIG_SCSI_LOGGING is not set
 # CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
 
 #
 # SCSI Transports
@@ -467,7 +487,11 @@ CONFIG_SCSI_LOWLEVEL=y
 # CONFIG_SCSI_SRP is not set
 CONFIG_ATA=y
 # CONFIG_ATA_NONSTANDARD is not set
+CONFIG_SATA_PMP=y
 CONFIG_SATA_AHCI=y
+# CONFIG_SATA_SIL24 is not set
+# CONFIG_SATA_FSL is not set
+CONFIG_ATA_SFF=y
 # CONFIG_SATA_SVW is not set
 # CONFIG_ATA_PIIX is not set
 # CONFIG_SATA_MV is not set
@@ -477,13 +501,11 @@ CONFIG_SATA_AHCI=y
 # CONFIG_SATA_PROMISE is not set
 # CONFIG_SATA_SX4 is not set
 # CONFIG_SATA_SIL is not set
-# CONFIG_SATA_SIL24 is not set
 # CONFIG_SATA_SIS is not set
 # CONFIG_SATA_ULI is not set
 # CONFIG_SATA_VIA is not set
 # CONFIG_SATA_VITESSE is not set
 # CONFIG_SATA_INIC162X is not set
-# CONFIG_SATA_FSL is not set
 CONFIG_PATA_ALI=y
 # CONFIG_PATA_AMD is not set
 # CONFIG_PATA_ARTOP is not set
@@ -523,6 +545,7 @@ CONFIG_PATA_ALI=y
 # CONFIG_PATA_VIA is not set
 # CONFIG_PATA_WINBOND is not set
 # CONFIG_PATA_PLATFORM is not set
+# CONFIG_PATA_SCH is not set
 # CONFIG_MD is not set
 # CONFIG_FUSION is not set
 
@@ -542,23 +565,7 @@ CONFIG_DUMMY=y
 # CONFIG_TUN is not set
 # CONFIG_VETH is not set
 # CONFIG_ARCNET is not set
-CONFIG_PHYLIB=y
-
-#
-# MII PHY device drivers
-#
-# CONFIG_MARVELL_PHY is not set
-# CONFIG_DAVICOM_PHY is not set
-# CONFIG_QSEMI_PHY is not set
-# CONFIG_LXT_PHY is not set
-# CONFIG_CICADA_PHY is not set
-# CONFIG_VITESSE_PHY is not set
-# CONFIG_SMSC_PHY is not set
-# CONFIG_BROADCOM_PHY is not set
-# CONFIG_ICPLUS_PHY is not set
-# CONFIG_REALTEK_PHY is not set
-# CONFIG_FIXED_PHY is not set
-# CONFIG_MDIO_BITBANG is not set
+# CONFIG_PHYLIB is not set
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
 # CONFIG_HAPPYMEAL is not set
@@ -577,64 +584,10 @@ CONFIG_ULI526X=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
-CONFIG_NET_PCI=y
-# CONFIG_PCNET32 is not set
-# CONFIG_AMD8111_ETH is not set
-# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_NET_PCI is not set
 # CONFIG_B44 is not set
-# CONFIG_FORCEDETH is not set
-# CONFIG_EEPRO100 is not set
-# CONFIG_E100 is not set
-# CONFIG_FEALNX is not set
-# CONFIG_NATSEMI is not set
-# CONFIG_NE2K_PCI is not set
-# CONFIG_8139CP is not set
-CONFIG_8139TOO=y
-CONFIG_8139TOO_PIO=y
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 is not set
-# CONFIG_8139_OLD_RX_RESET is not set
-# CONFIG_R6040 is not set
-# CONFIG_SIS900 is not set
-# CONFIG_EPIC100 is not set
-# CONFIG_SUNDANCE is not set
-# CONFIG_TLAN is not set
-# CONFIG_VIA_RHINE is not set
-# CONFIG_SC92031 is not set
-CONFIG_NETDEV_1000=y
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
-# CONFIG_E1000E is not set
-# CONFIG_E1000E_ENABLED is not set
-# CONFIG_IP1000 is not set
-# CONFIG_IGB is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_R8169 is not set
-# CONFIG_SIS190 is not set
-# CONFIG_SKGE is not set
-# CONFIG_SKY2 is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_VIA_VELOCITY is not set
-# CONFIG_TIGON3 is not set
-# CONFIG_BNX2 is not set
-# CONFIG_GIANFAR is not set
-# CONFIG_QLA3XXX is not set
-# CONFIG_ATL1 is not set
-CONFIG_NETDEV_10000=y
-# CONFIG_CHELSIO_T1 is not set
-# CONFIG_CHELSIO_T3 is not set
-# CONFIG_IXGBE is not set
-# CONFIG_IXGB is not set
-# CONFIG_S2IO is not set
-# CONFIG_MYRI10GE is not set
-# CONFIG_NETXEN_NIC is not set
-# CONFIG_NIU is not set
-# CONFIG_MLX4_CORE is not set
-# CONFIG_TEHUTI is not set
-# CONFIG_BNX2X is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
 # CONFIG_TR is not set
 
 #
@@ -642,6 +595,7 @@ CONFIG_NETDEV_10000=y
 #
 # CONFIG_WLAN_PRE80211 is not set
 # CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
 # CONFIG_WAN is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
@@ -697,6 +651,7 @@ CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
 # CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 # CONFIG_NOZOMI is not set
 
@@ -738,13 +693,6 @@ CONFIG_I2C_BOARDINFO=y
 # CONFIG_I2C_CHARDEV is not set
 
 #
-# I2C Algorithms
-#
-# CONFIG_I2C_ALGOBIT is not set
-# CONFIG_I2C_ALGOPCF is not set
-# CONFIG_I2C_ALGOPCA is not set
-
-#
 # I2C Hardware Bus support
 #
 # CONFIG_I2C_ALI1535 is not set
@@ -766,9 +714,11 @@ CONFIG_I2C_MPC=y
 # CONFIG_I2C_SIS630 is not set
 # CONFIG_I2C_SIS96X is not set
 # CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
 # CONFIG_I2C_VIA is not set
 # CONFIG_I2C_VIAPRO is not set
 # CONFIG_I2C_VOODOO3 is not set
+# CONFIG_I2C_PCA_PLATFORM is not set
 
 #
 # Miscellaneous I2C Chip support
@@ -778,19 +728,13 @@ CONFIG_I2C_MPC=y
 # CONFIG_SENSORS_PCF8574 is not set
 # CONFIG_PCF8575 is not set
 # CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_TPS65010 is not set
 # CONFIG_SENSORS_MAX6875 is not set
 # CONFIG_SENSORS_TSL2550 is not set
 # CONFIG_I2C_DEBUG_CORE is not set
 # CONFIG_I2C_DEBUG_ALGO is not set
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
 # CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
 # CONFIG_W1 is not set
 # CONFIG_POWER_SUPPLY is not set
 # CONFIG_HWMON is not set
@@ -807,12 +751,21 @@ CONFIG_SSB_POSSIBLE=y
 # Multifunction device drivers
 #
 # CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
 
 #
 # Multimedia devices
 #
+
+#
+# Multimedia core support
+#
 # CONFIG_VIDEO_DEV is not set
 # CONFIG_DVB_CORE is not set
+
+#
+# Multimedia drivers
+#
 CONFIG_DAB=y
 
 #
@@ -822,7 +775,57 @@ CONFIG_DAB=y
 # CONFIG_DRM is not set
 # CONFIG_VGASTATE is not set
 CONFIG_VIDEO_OUTPUT_CONTROL=y
-# CONFIG_FB is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+CONFIG_FB_DEFERRED_IO=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_OF is not set
+# CONFIG_FB_CT65550 is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_VGA16 is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+CONFIG_FB_FSL_DIU=y
+# CONFIG_FB_IBM_GXT4500 is not set
+# CONFIG_FB_VIRTUAL is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -836,6 +839,8 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
 CONFIG_VGA_CONSOLE=y
 # CONFIG_VGACON_SOFT_SCROLLBACK is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE is not set
+# CONFIG_LOGO is not set
 
 #
 # Sound
@@ -879,6 +884,7 @@ CONFIG_SND_VERBOSE_PROCFS=y
 # CONFIG_SND_AU8810 is not set
 # CONFIG_SND_AU8820 is not set
 # CONFIG_SND_AU8830 is not set
+# CONFIG_SND_AW2 is not set
 # CONFIG_SND_AZT3328 is not set
 # CONFIG_SND_BT87X is not set
 # CONFIG_SND_CA0106 is not set
@@ -945,14 +951,14 @@ CONFIG_SND_VERBOSE_PROCFS=y
 CONFIG_SND_SOC=y
 
 #
-# SoC Audio support for SuperH
-#
-
-#
 # ALSA SoC audio for Freescale SOCs
 #
 CONFIG_SND_SOC_MPC8610=y
 CONFIG_SND_SOC_MPC8610_HPCD=y
+
+#
+# SoC Audio for the Texas Instruments OMAP
+#
 CONFIG_SND_SOC_CS4270=y
 CONFIG_SND_SOC_CS4270_VD33_ERRATA=y
 
@@ -969,6 +975,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
 CONFIG_USB_ARCH_HAS_EHCI=y
 # CONFIG_USB is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
 
 #
 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -977,14 +985,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
 # CONFIG_NEW_LEDS is not set
+# CONFIG_ACCESSIBILITY is not set
 # CONFIG_INFINIBAND is not set
 # CONFIG_EDAC is not set
 # CONFIG_RTC_CLASS is not set
 # CONFIG_DMADEVICES is not set
-
-#
-# Userspace I/O
-#
 # CONFIG_UIO is not set
 
 #
@@ -1004,7 +1009,6 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
-# CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_DNOTIFY is not set
 # CONFIG_INOTIFY is not set
@@ -1061,10 +1065,9 @@ CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
 CONFIG_NFSD=y
 # CONFIG_NFSD_V3 is not set
-CONFIG_NFSD_TCP=y
+# CONFIG_NFSD_V4 is not set
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
@@ -1148,6 +1151,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 # Library routines
 #
 CONFIG_BITREVERSE=y
+# CONFIG_GENERIC_FIND_FIRST_BIT is not set
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
 # CONFIG_CRC_ITU_T is not set
@@ -1158,6 +1162,7 @@ CONFIG_PLIST=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
 CONFIG_HAS_DMA=y
+CONFIG_HAVE_LMB=y
 
 #
 # Kernel hacking
@@ -1165,6 +1170,7 @@ CONFIG_HAS_DMA=y
 # CONFIG_PRINTK_TIME is not set
 CONFIG_ENABLE_WARN_DEPRECATED=y
 CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_FS is not set
@@ -1175,6 +1181,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
 CONFIG_SCHED_DEBUG=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
 # CONFIG_SLUB_DEBUG_ON is not set
 # CONFIG_SLUB_STATS is not set
 # CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1188,9 +1195,11 @@ CONFIG_SCHED_DEBUG=y
 CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
 # CONFIG_DEBUG_LIST is not set
 # CONFIG_DEBUG_SG is not set
 # CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_BACKTRACE_SELF_TEST is not set
 # CONFIG_FAULT_INJECTION is not set
 # CONFIG_SAMPLES is not set
@@ -1198,6 +1207,7 @@ CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_STACK_USAGE is not set
 # CONFIG_DEBUG_PAGEALLOC is not set
 # CONFIG_DEBUGGER is not set
+# CONFIG_IRQSTACKS is not set
 # CONFIG_BDI_SWITCH is not set
 # CONFIG_PPC_EARLY_DEBUG is not set
 
@@ -1208,48 +1218,80 @@ CONFIG_DEBUG_INFO=y
 # CONFIG_SECURITY is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_CRYPTO=y
-# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Crypto core or helper
+#
 # CONFIG_CRYPTO_MANAGER is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
 # CONFIG_CRYPTO_HMAC is not set
 # CONFIG_CRYPTO_XCBC is not set
-# CONFIG_CRYPTO_NULL is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
 # CONFIG_CRYPTO_MD4 is not set
 # CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
 # CONFIG_CRYPTO_SHA1 is not set
 # CONFIG_CRYPTO_SHA256 is not set
 # CONFIG_CRYPTO_SHA512 is not set
-# CONFIG_CRYPTO_WP512 is not set
 # CONFIG_CRYPTO_TGR192 is not set
-# CONFIG_CRYPTO_GF128MUL is not set
-# CONFIG_CRYPTO_ECB is not set
-# CONFIG_CRYPTO_CBC is not set
-# CONFIG_CRYPTO_PCBC is not set
-# CONFIG_CRYPTO_LRW is not set
-# CONFIG_CRYPTO_XTS is not set
-# CONFIG_CRYPTO_CTR is not set
-# CONFIG_CRYPTO_GCM is not set
-# CONFIG_CRYPTO_CCM is not set
-# CONFIG_CRYPTO_CRYPTD is not set
-# CONFIG_CRYPTO_DES is not set
-# CONFIG_CRYPTO_FCRYPT is not set
-# CONFIG_CRYPTO_BLOWFISH is not set
-# CONFIG_CRYPTO_TWOFISH is not set
-# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
 # CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
 # CONFIG_CRYPTO_CAST5 is not set
 # CONFIG_CRYPTO_CAST6 is not set
-# CONFIG_CRYPTO_TEA is not set
-# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
 # CONFIG_CRYPTO_KHAZAD is not set
-# CONFIG_CRYPTO_ANUBIS is not set
-# CONFIG_CRYPTO_SEED is not set
 # CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
 # CONFIG_CRYPTO_DEFLATE is not set
-# CONFIG_CRYPTO_MICHAEL_MIC is not set
-# CONFIG_CRYPTO_CRC32C is not set
-# CONFIG_CRYPTO_CAMELLIA is not set
-# CONFIG_CRYPTO_AUTHENC is not set
 # CONFIG_CRYPTO_LZO is not set
 CONFIG_CRYPTO_HW=y
 # CONFIG_CRYPTO_DEV_HIFN_795X is not set
 # CONFIG_PPC_CLOCK is not set
+CONFIG_PPC_LIB_RHEAP=y
+# CONFIG_VIRTUALIZATION is not set
-- 
1.5.5

^ permalink raw reply related

* Re: [PATCH] POWERPC: Support ISA legacy addresses in of_address_to_resource()
From: Benjamin Herrenschmidt @ 2008-05-09 22:27 UTC (permalink / raw)
  To: Nate Case; +Cc: linuxppc-dev
In-Reply-To: <1210368679.13845.315.camel@localhost.localdomain>

> m to memory or something like that.
> 
> Your suspicion is correct in a way -- this allows IO port addresses to
> make their way to 'struct resource' so that drivers can use inb(),
> outb(), etc.  After some thought, I'm not sure if a device tree using
> I/O port addresses for a legacy node is considered a bug or not.
> 
> Here is the failure case
 
.../...

Your isa node is at the root of the device-tree and not behind some kind
of PCI bridge ?

In that case, I suspect that you do need a range property that converts
ISA IO addresses to toplevel memory addresses.

That is, you keep the "1" at the beginning of the reg property of ISA
devices that use ISA IO ports, but you make the bridge range property
convert from IO to memory.

Now, that might expose different issues with of_address_to_resource()
but then we can fix them.

One thing we can do for example, is to make it find legacy ISA based on
the base of the ISA bridge and turn them back into IO ports.

Ben.

^ permalink raw reply

* ucc_geth_ethtool.c: removed duplicated include
From: Huang Weiyi @ 2008-05-10  1:07 UTC (permalink / raw)
  To: leoli; +Cc: netdev, linuxppc-dev

Removed duplicated include <asm/uaccess.h> in 
drivers/net/ucc_geth_ethtool.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>

--- a/drivers/net/ucc_geth_ethtool.c    2008-05-10 08:41:10.000000000 +0800
+++ b/drivers/net/ucc_geth_ethtool.c    2008-05-10 08:41:42.000000000 +0800
@@ -37,7 +37,6 @@
 #include <asm/irq.h>
 #include <asm/uaccess.h>
 #include <asm/types.h>
-#include <asm/uaccess.h>

 #include "ucc_geth.h"
 #include "ucc_geth_mii.h"

^ permalink raw reply

* Re: patch to install unstripped vDSO on disk breaks powerpc kernel build
From: Chris Friesen @ 2008-05-10  4:43 UTC (permalink / raw)
  To: Roland McGrath; +Cc: linuxppc-dev, paulus
In-Reply-To: <20080509194427.3BDB126FA85@magilla.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1390 bytes --]

Roland McGrath wrote:
> I haven't seen that error before.  Can you show the output of {eu-,}readelf -lS
> on vdso64.so.dbg, and also on the vdso64.so successfully built when you
> revert the patch?

I've attached the raw output from the two commands.  The delta between 
the two is as follows:


-There are 14 section headers, starting at offset 0xd58:
+There are 16 section headers, starting at offset 0xd68:

  Section Headers:
    [Nr] Name              Type             Address           Offset
@@ -33,7 +33,11 @@
    [12] .rela.dyn         RELA             0000000000100be8  00000be8
         0000000000000000  0000000000000018   A       2     0     8
    [13] .shstrtab         STRTAB           0000000000000000  00000cd8
-       0000000000000079  0000000000000000           0     0     1
+       0000000000000089  0000000000000000           0     0     1
+  [14] .symtab           SYMTAB           0000000000000000  00001168
+       0000000000000d80  0000000000000018          15   134     8
+  [15] .strtab           STRTAB           0000000000000000  00001ee8
+       00000000000004a3  0000000000000000           0     0     1
  Key to Flags:
    W (write), A (alloc), X (execute), M (merge), S (strings)
    I (info), L (link order), G (group), x (unknown)


Also, I'm going to be away on holidays next week, so I won't be able to 
test this further until the 19th or so.


Chris

[-- Attachment #2: good.txt --]
[-- Type: text/plain, Size: 3477 bytes --]

good:

[cfriesen@localhost linux-2.6]$ /home/cfriesen/bin/ppc64-R9a/bin/ppc64-R9a-readelf -lS ../g5/arch/powerpc/kernel/vdso64/vdso64.so
There are 14 section headers, starting at offset 0xd58:

Section Headers:
  [Nr] Name              Type             Address           Offset
       Size              EntSize          Flags  Link  Info  Align
  [ 0]                   NULL             0000000000000000  00000000
       0000000000000000  0000000000000000           0     0     0
  [ 1] .hash             HASH             0000000000100120  00000120
       000000000000004c  0000000000000004   A       2     0     8
  [ 2] .dynsym           DYNSYM           0000000000100170  00000170
       0000000000000150  0000000000000018   A       3     4     8
  [ 3] .dynstr           STRTAB           00000000001002c0  000002c0
       00000000000000ef  0000000000000000   A       0     0     1
  [ 4] .gnu.version      VERSYM           00000000001003b0  000003b0
       000000000000001c  0000000000000002   A       2     0     2
  [ 5] .gnu.version_d    VERDEF           00000000001003d0  000003d0
       0000000000000038  0000000000000000   A       3     2     8
  [ 6] .note             NOTE             0000000000100408  00000408
       0000000000000018  0000000000000000   A       0     0     4
  [ 7] .text             PROGBITS         0000000000100420  00000420
       00000000000002ec  0000000000000000  AX       0     0     8
  [ 8] .eh_frame_hdr     PROGBITS         0000000000100710  00000710
       0000000000000008  0000000000000000   A       0     0     4
  [ 9] .eh_frame         PROGBITS         0000000000100718  00000718
       00000000000004c4  0000000000000000   A       0     0     8
  [10] .got              PROGBITS         0000000000100be0  00000be0
       0000000000000008  0000000000000008  WA       0     0     8
  [11] .dynamic          DYNAMIC          0000000000100be8  00000be8
       00000000000000f0  0000000000000010  WA       3     0     8
  [12] .rela.dyn         RELA             0000000000100be8  00000be8
       0000000000000000  0000000000000018   A       2     0     8
  [13] .shstrtab         STRTAB           0000000000000000  00000cd8
       0000000000000079  0000000000000000           0     0     1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)

Elf file type is DYN (Shared object file)
Entry point 0x0
There are 4 program headers, starting at offset 64

Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  LOAD           0x0000000000000000 0x0000000000100000 0x0000000000100000
                 0x0000000000000cd8 0x0000000000000cd8  R E    10000
  NOTE           0x0000000000000408 0x0000000000100408 0x0000000000100408
                 0x0000000000000018 0x0000000000000018  R      4
  DYNAMIC        0x0000000000000be8 0x0000000000100be8 0x0000000000100be8
                 0x00000000000000f0 0x00000000000000f0  R      8
  GNU_EH_FRAME   0x0000000000000710 0x0000000000100710 0x0000000000100710
                 0x0000000000000008 0x0000000000000008  R      4

 Section to Segment mapping:
  Segment Sections...
   00     .hash .dynsym .dynstr .gnu.version .gnu.version_d .note .text .eh_frame_hdr .eh_frame .got .dynamic
   01     .note
   02     .dynamic
   03     .eh_frame_hdr

[-- Attachment #3: bad.txt --]
[-- Type: text/plain, Size: 3750 bytes --]

bad:

[cfriesen@localhost linux-2.6]$ /home/cfriesen/bin/ppc64-R9a/bin/ppc64-R9a-readelf -lS ../g5/arch/powerpc/kernel/vdso64/vdso64.so.dbg
There are 16 section headers, starting at offset 0xd68:

Section Headers:
  [Nr] Name              Type             Address           Offset
       Size              EntSize          Flags  Link  Info  Align
  [ 0]                   NULL             0000000000000000  00000000
       0000000000000000  0000000000000000           0     0     0
  [ 1] .hash             HASH             0000000000100120  00000120
       000000000000004c  0000000000000004   A       2     0     8
  [ 2] .dynsym           DYNSYM           0000000000100170  00000170
       0000000000000150  0000000000000018   A       3     4     8
  [ 3] .dynstr           STRTAB           00000000001002c0  000002c0
       00000000000000ef  0000000000000000   A       0     0     1
  [ 4] .gnu.version      VERSYM           00000000001003b0  000003b0
       000000000000001c  0000000000000002   A       2     0     2
  [ 5] .gnu.version_d    VERDEF           00000000001003d0  000003d0
       0000000000000038  0000000000000000   A       3     2     8
  [ 6] .note             NOTE             0000000000100408  00000408
       0000000000000018  0000000000000000   A       0     0     4
  [ 7] .text             PROGBITS         0000000000100420  00000420
       00000000000002ec  0000000000000000  AX       0     0     8
  [ 8] .eh_frame_hdr     PROGBITS         0000000000100710  00000710
       0000000000000008  0000000000000000   A       0     0     4
  [ 9] .eh_frame         PROGBITS         0000000000100718  00000718
       00000000000004c4  0000000000000000   A       0     0     8
  [10] .got              PROGBITS         0000000000100be0  00000be0
       0000000000000008  0000000000000008  WA       0     0     8
  [11] .dynamic          DYNAMIC          0000000000100be8  00000be8
       00000000000000f0  0000000000000010  WA       3     0     8
  [12] .rela.dyn         RELA             0000000000100be8  00000be8
       0000000000000000  0000000000000018   A       2     0     8
  [13] .shstrtab         STRTAB           0000000000000000  00000cd8
       0000000000000089  0000000000000000           0     0     1
  [14] .symtab           SYMTAB           0000000000000000  00001168
       0000000000000d80  0000000000000018          15   134     8
  [15] .strtab           STRTAB           0000000000000000  00001ee8
       00000000000004a3  0000000000000000           0     0     1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)

Elf file type is DYN (Shared object file)
Entry point 0x0
There are 4 program headers, starting at offset 64

Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  LOAD           0x0000000000000000 0x0000000000100000 0x0000000000100000
                 0x0000000000000cd8 0x0000000000000cd8  R E    10000
  NOTE           0x0000000000000408 0x0000000000100408 0x0000000000100408
                 0x0000000000000018 0x0000000000000018  R      4
  DYNAMIC        0x0000000000000be8 0x0000000000100be8 0x0000000000100be8
                 0x00000000000000f0 0x00000000000000f0  R      8
  GNU_EH_FRAME   0x0000000000000710 0x0000000000100710 0x0000000000100710
                 0x0000000000000008 0x0000000000000008  R      4

 Section to Segment mapping:
  Segment Sections...
   00     .hash .dynsym .dynstr .gnu.version .gnu.version_d .note .text .eh_frame_hdr .eh_frame .got .dynamic
   01     .note
   02     .dynamic
   03     .eh_frame_hdr

^ permalink raw reply

* Re: MPC5200b external interrupt registration problem
From: Michael Ellerman @ 2008-05-10  7:30 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20080509190218.GA32008@ld0162-tx32.am.freescale.net>

[-- Attachment #1: Type: text/plain, Size: 998 bytes --]

On Fri, 2008-05-09 at 14:02 -0500, Scott Wood wrote:
> On Fri, May 09, 2008 at 02:49:04PM -0400, Nick wrote:
> > I am writing a driver to service an interrupt from our fpga.  I am calling request_irq in the open
> > function of my driver.  The fpga is connected to external interrupt 1.  I am using interrupt
> > number 65 in the request_irq but the function is failing.
> 
> request_irq takes a virtual IRQ number, not a hardware IRQ number.  You
> need to get the virtual IRQ number from irq_of_parse_and_map(), or from
> irq_create_mapping().
> 
> This would probably confuse far fewer people if we used pointers in the
> API rather than virtual IRQ numbers...

I'll do the core changes if you fix all the drivers .. ;)

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* ppc compile failure (__flush_icache_range etc undeclared)
From: Meelis Roos @ 2008-05-10 11:51 UTC (permalink / raw)
  To: Linux Kernel list, linuxppc-dev

Tried 2.6.26-rc1+git on ppc (arch/ppc, PReP subarch) and got this:

arch/ppc/kernel/ppc_ksyms.c: At top level:
arch/ppc/kernel/ppc_ksyms.c:152: error: '__flush_icache_range' undeclared here (not in a function)
arch/ppc/kernel/ppc_ksyms.c:152: warning: type defaults to 'int' in declaration of '__flush_icache_range'
arch/ppc/kernel/ppc_ksyms.c:153: error: 'flush_dcache_range' undeclared here (not in a function)
arch/ppc/kernel/ppc_ksyms.c:153: warning: type defaults to 'int' in declaration of 'flush_dcache_range'
arch/ppc/kernel/ppc_ksyms.c:154: error: 'flush_icache_user_range' undeclared here (not in a function)
arch/ppc/kernel/ppc_ksyms.c:154: warning: type defaults to 'int' in declaration of 'flush_icache_user_range'
arch/ppc/kernel/ppc_ksyms.c:155: error: 'flush_dcache_page' undeclared here (not in a function)
arch/ppc/kernel/ppc_ksyms.c:155: warning: type defaults to 'int' in declaration of 'flush_dcache_page'
make[1]: *** [arch/ppc/kernel/ppc_ksyms.o] Error 1


-- 
Meelis Roos (mroos@linux.ee)

^ permalink raw reply

* Re: ppc compile failure (__flush_icache_range etc undeclared)
From: Josh Boyer @ 2008-05-10 13:22 UTC (permalink / raw)
  To: Meelis Roos; +Cc: linuxppc-dev, Linux Kernel list
In-Reply-To: <Pine.SOC.4.64.0805101448580.8450@math.ut.ee>

On Sat, 10 May 2008 14:51:27 +0300 (EEST)
Meelis Roos <mroos@linux.ee> wrote:

> Tried 2.6.26-rc1+git on ppc (arch/ppc, PReP subarch) and got this:

Segher sent patches to fix this earlier this week.  You can find them
here:

http://patchwork.ozlabs.org/linuxppc/patch?id=18348
http://patchwork.ozlabs.org/linuxppc/patch?id=18346
http://patchwork.ozlabs.org/linuxppc/patch?id=18347

People keep breaking arch/ppc and it seems there's little motivation to
fix it since it's going away in a month.

josh

^ permalink raw reply

* Re: ppc compile failure (__flush_icache_range etc undeclared)
From: Segher Boessenkool @ 2008-05-10 13:26 UTC (permalink / raw)
  To: Meelis Roos; +Cc: linuxppc-dev, Linux Kernel list
In-Reply-To: <Pine.SOC.4.64.0805101448580.8450@math.ut.ee>

> Tried 2.6.26-rc1+git on ppc (arch/ppc, PReP subarch) and got this:
>
> arch/ppc/kernel/ppc_ksyms.c: At top level:
> arch/ppc/kernel/ppc_ksyms.c:152: error: '__flush_icache_range' 
> undeclared here (not in a function)

That's fixed by [2/3] in 
http://ozlabs.org/pipermail/linuxppc-dev/2008-May/056010.html


Segher

^ permalink raw reply

* [PATCH] [POWERPC] Add i2c pins to dts and board setup
From: Jochen Friedrich @ 2008-05-10 15:50 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: Kernel, Linux, linuxppc-dev list, Linux I2C, Scott Wood,
	Jean Delvare

Initialize I2C pins on boards with CPM1/CPM2 controllers.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
 arch/powerpc/boot/dts/mpc8272ads.dts         |   10 ++++++++++
 arch/powerpc/boot/dts/mpc866ads.dts          |   10 ++++++++++
 arch/powerpc/boot/dts/mpc885ads.dts          |   10 ++++++++++
 arch/powerpc/platforms/82xx/mpc8272_ads.c    |    4 ++++
 arch/powerpc/platforms/8xx/mpc86xads_setup.c |    4 ++++
 arch/powerpc/platforms/8xx/mpc885ads_setup.c |    3 +++
 6 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
index 46e2da3..57abcc1 100644
--- a/arch/powerpc/boot/dts/mpc8272ads.dts
+++ b/arch/powerpc/boot/dts/mpc8272ads.dts
@@ -217,6 +217,16 @@
 				linux,network-index = <1>;
 				fsl,cpm-command = <0x16200300>;
 			};
+
+			i2c@11860 {
+				compatible = "fsl,mpc8272-i2c",
+					     "fsl,cpm2-i2c",
+					     "fsl,cpm-i2c";
+				reg = <11860 20 8afc 2>;
+				interrupts = <1 8>;
+				interrupt-parent = <&PIC>;
+				fsl,cpm-command = <29600000>;
+			};
 		};
 
 		PIC: interrupt-controller@10c00 {
diff --git a/arch/powerpc/boot/dts/mpc866ads.dts b/arch/powerpc/boot/dts/mpc866ads.dts
index 765e43c..84c190e 100644
--- a/arch/powerpc/boot/dts/mpc866ads.dts
+++ b/arch/powerpc/boot/dts/mpc866ads.dts
@@ -171,6 +171,16 @@
 				fsl,cpm-command = <0000>;
 				linux,network-index = <1>;
 			};
+
+			i2c@860 {
+				compatible = "fsl,mpc866-i2c",
+					     "fsl,cpm1-i2c",
+					     "fsl,cpm-i2c";
+				reg = <860 20 3c80 30>;
+				interrupts = <10>;
+				interrupt-parent = <&CPM_PIC>;
+				fsl,cpm-command = <0010>;
+			};
 		};
 	};
 
diff --git a/arch/powerpc/boot/dts/mpc885ads.dts b/arch/powerpc/boot/dts/mpc885ads.dts
index 9895043..67d0e8d 100644
--- a/arch/powerpc/boot/dts/mpc885ads.dts
+++ b/arch/powerpc/boot/dts/mpc885ads.dts
@@ -215,6 +215,16 @@
 				fsl,cpm-command = <0x80>;
 				linux,network-index = <2>;
 			};
+
+			i2c@860 {
+				compatible = "fsl,mpc885-i2c",
+					     "fsl,cpm1-i2c",
+					     "fsl,cpm-i2c";
+				reg = <860 20 3c80 30>;
+				interrupts = <10>;
+				interrupt-parent = <&CPM_PIC>;
+				fsl,cpm-command = <0010>;
+			};
 		};
 	};
 
diff --git a/arch/powerpc/platforms/82xx/mpc8272_ads.c b/arch/powerpc/platforms/82xx/mpc8272_ads.c
index 7d30187..8054c68 100644
--- a/arch/powerpc/platforms/82xx/mpc8272_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc8272_ads.c
@@ -96,6 +96,10 @@ static struct cpm_pin mpc8272_ads_pins[] = {
 	{1, 31, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
 	{2, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
 	{2, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+
+	/* I2C */
+	{3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN},
+	{3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN},
 };
 
 static void __init init_ioports(void)
diff --git a/arch/powerpc/platforms/8xx/mpc86xads_setup.c b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
index c028a5b..caaec29 100644
--- a/arch/powerpc/platforms/8xx/mpc86xads_setup.c
+++ b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
@@ -65,6 +65,10 @@ static struct cpm_pin mpc866ads_pins[] = {
 	{CPM_PORTD, 13, CPM_PIN_OUTPUT},
 	{CPM_PORTD, 14, CPM_PIN_OUTPUT},
 	{CPM_PORTD, 15, CPM_PIN_OUTPUT},
+
+	/* I2C */
+	{CPM_PORTB, 26, CPM_PIN_INPUT | CPM_PIN_OPENDRAIN},
+	{CPM_PORTB, 27, CPM_PIN_INPUT | CPM_PIN_OPENDRAIN},
 };
 
 static void __init init_ioports(void)
diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
index 6e7ded0..45ed6cd 100644
--- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c
+++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
@@ -158,6 +158,9 @@ static struct cpm_pin mpc885ads_pins[] = {
 	{CPM_PORTE, 28, CPM_PIN_OUTPUT},
 	{CPM_PORTE, 29, CPM_PIN_OUTPUT},
 #endif
+	/* I2C */
+	{CPM_PORTB, 26, CPM_PIN_INPUT | CPM_PIN_OPENDRAIN},
+	{CPM_PORTB, 27, CPM_PIN_INPUT | CPM_PIN_OPENDRAIN},
 };
 
 static void __init init_ioports(void)
-- 
1.5.5.1

^ permalink raw reply related

* [PATCH] i2c: adds support for i2c bus on Freescale CPM1/CPM2 controllers
From: Jochen Friedrich @ 2008-05-10 16:04 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Kernel, Linux, linuxppc-dev list, Linux I2C, Scott Wood,
	Andrew Morton

This driver uses the port of 2.4 code from Vitaly Bordug
<vitb@kernel.crashing.org> and the actual algorithm used by the i2c
driver of the DBox code on cvs.tuxboc.org from Felix Domke
(tmbinc@gmx.net) and Gillem (htoa@gmx.net) converted to an
of_platform_driver. Tested on CPM1 (MPC823 on dbox2 hardware) and
CPM2 (MPC8272).

Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
 drivers/i2c/busses/Kconfig   |   10 +
 drivers/i2c/busses/Makefile  |    1 +
 drivers/i2c/busses/i2c-cpm.c |  728 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 739 insertions(+), 0 deletions(-)
 create mode 100644 drivers/i2c/busses/i2c-cpm.c

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 48438cc..c627b94 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -117,6 +117,16 @@ config I2C_BLACKFIN_TWI_CLK_KHZ
 	help
 	  The unit of the TWI clock is kHz.
 
+config I2C_CPM
+	tristate "Freescale CPM1 or CPM2 (MPC8xx/826x)"
+	depends on (CPM1 || CPM2) && OF_I2C
+	help
+	  This supports the use of the I2C interface on Freescale
+	  processors with CPM1 or CPM2.
+
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-cpm.
+
 config I2C_DAVINCI
 	tristate "DaVinci I2C driver"
 	depends on ARCH_DAVINCI
diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
index e8c882a..1ccd5ba 100644
--- a/drivers/i2c/busses/Makefile
+++ b/drivers/i2c/busses/Makefile
@@ -11,6 +11,7 @@ obj-$(CONFIG_I2C_AMD8111)	+= i2c-amd8111.o
 obj-$(CONFIG_I2C_AT91)		+= i2c-at91.o
 obj-$(CONFIG_I2C_AU1550)	+= i2c-au1550.o
 obj-$(CONFIG_I2C_BLACKFIN_TWI)	+= i2c-bfin-twi.o
+obj-$(CONFIG_I2C_CPM)		+= i2c-cpm.o
 obj-$(CONFIG_I2C_DAVINCI)	+= i2c-davinci.o
 obj-$(CONFIG_I2C_ELEKTOR)	+= i2c-elektor.o
 obj-$(CONFIG_I2C_GPIO)		+= i2c-gpio.o
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c
new file mode 100644
index 0000000..2bd0512
--- /dev/null
+++ b/drivers/i2c/busses/i2c-cpm.c
@@ -0,0 +1,728 @@
+/*
+ * Freescale CPM1/CPM2 I2C interface.
+ * Copyright (c) 1999 Dan Malek (dmalek@jlc.net).
+ *
+ * moved into proper i2c interface;
+ * Brad Parker (brad@heeltoe.com)
+ *
+ * Parts from dbox2_i2c.c (cvs.tuxbox.org)
+ * (C) 2000-2001 Felix Domke (tmbinc@gmx.net), Gillem (htoa@gmx.net)
+ *
+ * (C) 2007 Montavista Software, Inc.
+ * Vitaly Bordug <vitb@kernel.crashing.org>
+ *
+ * Converted to of_platform_device. Renamed to i2c-cpm.c.
+ * (C) 2007,2008 Jochen Friedrich <jochen@scram.de>
+ *
+ *  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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/delay.h>
+#include <linux/slab.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/errno.h>
+#include <linux/stddef.h>
+#include <linux/i2c.h>
+#include <linux/io.h>
+#include <linux/dma-mapping.h>
+#include <linux/of_device.h>
+#include <linux/of_platform.h>
+#include <linux/of_i2c.h>
+#include <sysdev/fsl_soc.h>
+#include <asm/cpm.h>
+
+/* Try to define this if you have an older CPU (earlier than rev D4) */
+/* However, better use a GPIO based bitbang driver in this case :/   */
+#undef	I2C_CHIP_ERRATA
+
+#define CPM_MAX_READ    513
+#define CPM_MAXBD       4
+
+#define I2C_EB			(0x10) /* Big endian mode */
+#define I2C_EB_CPM2		(0x30) /* Big endian mode, memory snoop */
+
+#define DPRAM_BASE		((u8 __iomem __force *)cpm_muram_addr(0))
+
+/* I2C parameter RAM. */
+struct i2c_ram {
+	ushort  rbase;		/* Rx Buffer descriptor base address */
+	ushort  tbase;		/* Tx Buffer descriptor base address */
+	u_char  rfcr;		/* Rx function code */
+	u_char  tfcr;		/* Tx function code */
+	ushort  mrblr;		/* Max receive buffer length */
+	uint    rstate;		/* Internal */
+	uint    rdp;		/* Internal */
+	ushort  rbptr;		/* Rx Buffer descriptor pointer */
+	ushort  rbc;		/* Internal */
+	uint    rxtmp;		/* Internal */
+	uint    tstate;		/* Internal */
+	uint    tdp;		/* Internal */
+	ushort  tbptr;		/* Tx Buffer descriptor pointer */
+	ushort  tbc;		/* Internal */
+	uint    txtmp;		/* Internal */
+	char    res1[4];	/* Reserved */
+	ushort  rpbase;		/* Relocation pointer */
+	char    res2[2];	/* Reserved */
+};
+
+#define I2COM_START	0x80
+#define I2COM_MASTER	0x01
+#define I2CER_TXE	0x10
+#define I2CER_BUSY	0x04
+#define I2CER_TXB	0x02
+#define I2CER_RXB	0x01
+#define I2MOD_EN	0x01
+
+/* I2C Registers */
+struct i2c_reg {
+	u8	i2mod;
+	u8	res1[3];
+	u8	i2add;
+	u8	res2[3];
+	u8	i2brg;
+	u8	res3[3];
+	u8	i2com;
+	u8	res4[3];
+	u8	i2cer;
+	u8	res5[3];
+	u8	i2cmr;
+};
+
+struct cpm_i2c {
+	char *base;
+	struct of_device *ofdev;
+	struct i2c_adapter adap;
+	uint dp_addr;
+	int version; /* CPM1=1, CPM2=2 */
+	int irq;
+	int cp_command;
+	struct i2c_reg __iomem *i2c_reg;
+	struct i2c_ram __iomem *i2c_ram;
+	u16 i2c_addr;
+	wait_queue_head_t i2c_wait;
+	cbd_t __iomem *tbase;
+	cbd_t __iomem *rbase;
+	u_char *txbuf[CPM_MAXBD];
+	u_char *rxbuf[CPM_MAXBD];
+	u32 txdma[CPM_MAXBD];
+	u32 rxdma[CPM_MAXBD];
+};
+
+static irqreturn_t cpm_i2c_interrupt(int irq, void *dev_id)
+{
+	struct cpm_i2c *cpm;
+	struct i2c_reg __iomem *i2c_reg;
+	struct i2c_adapter *adap = dev_id;
+	int i;
+
+	cpm = i2c_get_adapdata(dev_id);
+	i2c_reg = cpm->i2c_reg;
+
+	/* Clear interrupt. */
+	i = in_8(&i2c_reg->i2cer);
+	out_8(&i2c_reg->i2cer, i);
+
+	dev_dbg(&adap->dev, "Interrupt: %x\n", i);
+
+	/* Get me going again. */
+	wake_up_interruptible(&cpm->i2c_wait);
+
+	return i ? IRQ_HANDLED : IRQ_NONE;
+}
+
+static void cpm_reset_i2c_params(struct cpm_i2c *cpm)
+{
+	struct i2c_ram __iomem *i2c_ram = cpm->i2c_ram;
+
+	/* Set up the IIC parameters in the parameter ram. */
+	out_be16(&i2c_ram->tbase, (u8 __iomem *)cpm->tbase - DPRAM_BASE);
+	out_be16(&i2c_ram->rbase, (u8 __iomem *)cpm->rbase - DPRAM_BASE);
+
+	if (cpm->version == 1) {
+		out_8(&i2c_ram->tfcr, I2C_EB);
+		out_8(&i2c_ram->rfcr, I2C_EB);
+	} else {
+		out_8(&i2c_ram->tfcr, I2C_EB_CPM2);
+		out_8(&i2c_ram->rfcr, I2C_EB_CPM2);
+	}
+
+	out_be16(&i2c_ram->mrblr, CPM_MAX_READ);
+
+	out_be32(&i2c_ram->rstate, 0);
+	out_be32(&i2c_ram->rdp, 0);
+	out_be16(&i2c_ram->rbptr, 0);
+	out_be16(&i2c_ram->rbc, 0);
+	out_be32(&i2c_ram->rxtmp, 0);
+	out_be32(&i2c_ram->tstate, 0);
+	out_be32(&i2c_ram->tdp, 0);
+	out_be16(&i2c_ram->tbptr, 0);
+	out_be16(&i2c_ram->tbc, 0);
+	out_be32(&i2c_ram->txtmp, 0);
+}
+
+static void cpm_i2c_force_close(struct i2c_adapter *adap)
+{
+	struct cpm_i2c *cpm = i2c_get_adapdata(adap);
+	struct i2c_reg __iomem *i2c_reg = cpm->i2c_reg;
+
+	dev_dbg(&adap->dev, "cpm_i2c_force_close()\n");
+
+	cpm_command(cpm->cp_command, CPM_CR_CLOSE_RX_BD);
+
+	out_8(&i2c_reg->i2cmr, 0x00);	/* Disable all interrupts */
+	out_8(&i2c_reg->i2cer, 0xff);
+}
+
+static void cpm_i2c_parse_message(struct i2c_adapter *adap,
+	struct i2c_msg *pmsg, int num, int tx, int rx)
+{
+	cbd_t __iomem *tbdf;
+	cbd_t __iomem *rbdf;
+	u_char addr;
+	u_char *tb;
+	u_char *rb;
+	struct cpm_i2c *cpm = i2c_get_adapdata(adap);
+
+	tbdf = cpm->tbase + tx;
+	rbdf = cpm->rbase + rx;
+
+	addr = pmsg->addr << 1;
+	if (pmsg->flags & I2C_M_RD)
+		addr |= 1;
+
+	tb = cpm->txbuf[tx];
+	rb = cpm->rxbuf[rx];
+
+	/* Align read buffer */
+	rb = (u_char *) (((ulong) rb + 1) & ~1);
+
+	tb[0] = addr;		/* Device address byte w/rw flag */
+
+	out_be16(&tbdf->cbd_datlen, pmsg->len + 1);
+	out_be16(&tbdf->cbd_sc, 0);
+
+	if (!(pmsg->flags & I2C_M_NOSTART))
+		setbits16(&tbdf->cbd_sc, BD_I2C_START);
+
+	if (tx + 1 == num)
+		setbits16(&tbdf->cbd_sc, BD_SC_LAST | BD_SC_WRAP);
+
+	if (pmsg->flags & I2C_M_RD) {
+		/*
+		 * To read, we need an empty buffer of the proper length.
+		 * All that is used is the first byte for address, the remainder
+		 * is just used for timing (and doesn't really have to exist).
+		 */
+
+		dev_dbg(&adap->dev, "cpm_i2c_read(abyte=0x%x)\n", addr);
+
+		out_be16(&rbdf->cbd_datlen, 0);
+		out_be16(&rbdf->cbd_sc, BD_SC_EMPTY | BD_SC_INTRPT);
+
+		if (rx + 1 == CPM_MAXBD)
+			setbits16(&rbdf->cbd_sc, BD_SC_WRAP);
+
+		eieio();
+		setbits16(&tbdf->cbd_sc, BD_SC_READY);
+	} else {
+		dev_dbg(&adap->dev, "cpm_iic_write(abyte=0x%x)\n", addr);
+
+		memcpy(tb+1, pmsg->buf, pmsg->len);
+
+		eieio();
+		setbits16(&tbdf->cbd_sc, BD_SC_READY | BD_SC_INTRPT);
+	}
+}
+
+static int cpm_i2c_check_message(struct i2c_adapter *adap,
+	struct i2c_msg *pmsg, int tx, int rx)
+{
+	cbd_t __iomem *tbdf;
+	cbd_t __iomem *rbdf;
+	u_char *tb;
+	u_char *rb;
+	struct cpm_i2c *cpm = i2c_get_adapdata(adap);
+
+	tbdf = cpm->tbase + tx;
+	rbdf = cpm->rbase + rx;
+
+	tb = cpm->txbuf[tx];
+	rb = cpm->rxbuf[rx];
+
+	/* Align read buffer */
+	rb = (u_char *) (((uint) rb + 1) & ~1);
+
+	eieio();
+	if (pmsg->flags & I2C_M_RD) {
+		dev_dbg(&adap->dev, "tx sc 0x%04x, rx sc 0x%04x\n",
+			in_be16(&tbdf->cbd_sc), in_be16(&rbdf->cbd_sc));
+
+		if (in_be16(&tbdf->cbd_sc) & BD_SC_NAK) {
+			dev_err(&adap->dev, "IIC read; No ack\n");
+			return -EIO;
+		}
+		if (in_be16(&rbdf->cbd_sc) & BD_SC_EMPTY) {
+			dev_err(&adap->dev,
+				"IIC read; complete but rbuf empty\n");
+			return -EREMOTEIO;
+		}
+		if (in_be16(&rbdf->cbd_sc) & BD_SC_OV) {
+			dev_err(&adap->dev, "IIC read; Overrun\n");
+			return -EREMOTEIO;
+		}
+		memcpy(pmsg->buf, rb, pmsg->len);
+	} else {
+		dev_dbg(&adap->dev, "tx sc %d 0x%04x\n", tx,
+			in_be16(&tbdf->cbd_sc));
+
+		if (in_be16(&tbdf->cbd_sc) & BD_SC_NAK) {
+			dev_err(&adap->dev, "IIC write; No ack\n");
+			return -EIO;
+		}
+		if (in_be16(&tbdf->cbd_sc) & BD_SC_UN) {
+			dev_err(&adap->dev, "IIC write; Underrun\n");
+			return -EIO;
+		}
+		if (in_be16(&tbdf->cbd_sc) & BD_SC_CL) {
+			dev_err(&adap->dev, "IIC write; Collision\n");
+			return -EIO;
+		}
+	}
+	return 0;
+}
+
+static int cpm_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
+{
+	struct cpm_i2c *cpm = i2c_get_adapdata(adap);
+	struct i2c_reg __iomem *i2c_reg = cpm->i2c_reg;
+	struct i2c_ram __iomem *i2c_ram = cpm->i2c_ram;
+	struct i2c_msg *pmsg;
+	int ret, i;
+	int tptr;
+	int rptr;
+	cbd_t __iomem *tbdf;
+	cbd_t __iomem *rbdf;
+
+	if (num > CPM_MAXBD)
+		return -EINVAL;
+
+	/* Check if we have any oversized READ requests */
+	for (i = 0; i < num; i++) {
+		pmsg = &msgs[i];
+		if (pmsg->len >= CPM_MAX_READ)
+			return -EINVAL;
+	}
+
+	/* Reset to use first buffer */
+	out_be16(&i2c_ram->rbptr, in_be16(&i2c_ram->rbase));
+	out_be16(&i2c_ram->tbptr, in_be16(&i2c_ram->tbase));
+
+	tbdf = cpm->tbase;
+	rbdf = cpm->rbase;
+
+	tptr = 0;
+	rptr = 0;
+
+	while (tptr < num) {
+		pmsg = &msgs[tptr];
+		dev_dbg(&adap->dev, "R: %d T: %d\n", rptr, tptr);
+
+		cpm_i2c_parse_message(adap, pmsg, num, tptr, rptr);
+		if (pmsg->flags & I2C_M_RD)
+			rptr++;
+		tptr++;
+	}
+	/* Start transfer now */
+	/* Enable RX/TX/Error interupts */
+	out_8(&i2c_reg->i2cmr, I2CER_BUSY | I2CER_TXB | I2CER_RXB);
+	out_8(&i2c_reg->i2cer, 0xff);	/* Clear interrupt status */
+	/* Chip bug, set enable here */
+	setbits8(&i2c_reg->i2mod, I2MOD_EN);	/* Enable */
+	/* Begin transmission */
+	setbits8(&i2c_reg->i2com, I2COM_MASTER);
+
+	tptr = 0;
+	rptr = 0;
+
+	while (tptr < num) {
+		/* Check for outstanding messages */
+		dev_dbg(&adap->dev, "test ready.\n");
+		pmsg = &msgs[tptr];
+		if (pmsg->flags & I2C_M_RD)
+			ret = wait_event_interruptible_timeout(cpm->i2c_wait,
+				!(in_be16(&rbdf[rptr].cbd_sc) & BD_SC_EMPTY),
+				1 * HZ);
+		else
+			ret = wait_event_interruptible_timeout(cpm->i2c_wait,
+				!(in_be16(&tbdf[tptr].cbd_sc) & BD_SC_READY),
+				1 * HZ);
+		if (ret == 0) {
+			ret = -EREMOTEIO;
+			dev_dbg(&adap->dev, "I2C read: timeout!\n");
+			goto out_err;
+		}
+		if (ret > 0) {
+			dev_dbg(&adap->dev, "ready.\n");
+			ret = cpm_i2c_check_message(adap, pmsg, tptr, rptr);
+			tptr++;
+			if (pmsg->flags & I2C_M_RD)
+				rptr++;
+			if (ret)
+				goto out_err;
+		}
+	}
+#ifdef I2C_CHIP_ERRATA
+	/*
+	 * Chip errata, clear enable. This is not needed on rev D4 CPUs.
+	 * Disabling I2C too early may cause too short stop condition
+	 */
+	udelay(4);
+	clrbits8(&i2c_reg->i2mod, I2MOD_EN);
+#endif
+	return (num);
+
+out_err:
+	cpm_i2c_force_close(adap);
+#ifdef I2C_CHIP_ERRATA
+	/*
+	 * Chip errata, clear enable. This is not needed on rev D4 CPUs.
+	 */
+	clrbits8(&i2c_reg->i2mod, I2MOD_EN);
+#endif
+	return ret;
+}
+
+static u32 cpm_i2c_func(struct i2c_adapter *adap)
+{
+	return I2C_FUNC_I2C | (I2C_FUNC_SMBUS_EMUL & ~I2C_FUNC_SMBUS_QUICK);
+}
+
+/* -----exported algorithm data: -------------------------------------	*/
+
+static const struct i2c_algorithm cpm_i2c_algo = {
+	.master_xfer = cpm_i2c_xfer,
+	.functionality = cpm_i2c_func,
+};
+
+static const struct i2c_adapter cpm_ops = {
+	.owner		= THIS_MODULE,
+	.name		= "i2c-cpm",
+	.algo		= &cpm_i2c_algo,
+	.class		= I2C_CLASS_HWMON,
+};
+
+static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm)
+{
+	struct of_device *ofdev = cpm->ofdev;
+	const u32 *data;
+	int len, ret, i;
+	void __iomem *i2c_base;
+	cbd_t __iomem *tbdf;
+	cbd_t __iomem *rbdf;
+	unsigned char brg;
+
+	dev_dbg(&cpm->ofdev->dev, "cpm_i2c_setup()\n");
+
+	init_waitqueue_head(&cpm->i2c_wait);
+
+	cpm->irq = of_irq_to_resource(ofdev->node, 0, NULL);
+	if (cpm->irq == NO_IRQ)
+		return -EINVAL;
+
+	/* Install interrupt handler. */
+	ret = request_irq(cpm->irq, cpm_i2c_interrupt, 0, "cpm_i2c",
+			  &cpm->adap);
+	if (ret)
+		goto out_irq;
+
+	/* IIC parameter RAM */
+	i2c_base = of_iomap(ofdev->node, 1);
+	if (i2c_base == NULL) {
+		ret = -EINVAL;
+		goto out_irq;
+	}
+
+	if (of_device_is_compatible(ofdev->node, "fsl,cpm1-i2c")) {
+
+		/* Check for and use a microcode relocation patch. */
+		cpm->i2c_ram = i2c_base;
+		cpm->i2c_addr = in_be16(&cpm->i2c_ram->rpbase);
+
+		/*
+		 * Maybe should use cpm_muram_alloc instead of hardcoding
+		 * this in micropatch.c
+		 */
+		if (cpm->i2c_addr) {
+			cpm->i2c_ram = cpm_muram_addr(cpm->i2c_addr);
+			iounmap(i2c_base);
+		}
+
+		cpm->version = 1;
+
+	} else if (of_device_is_compatible(ofdev->node, "fsl,cpm2-i2c")) {
+		cpm->i2c_addr = cpm_muram_alloc(sizeof(struct i2c_ram), 64);
+		cpm->i2c_ram = cpm_muram_addr(cpm->i2c_addr);
+		out_be16(i2c_base, cpm->i2c_addr);
+		iounmap(i2c_base);
+
+		cpm->version = 2;
+
+	} else {
+		iounmap(i2c_base);
+		ret = -EINVAL;
+		goto out_irq;
+	}
+
+	/* I2C control/status registers */
+	cpm->i2c_reg = of_iomap(ofdev->node, 0);
+	if (cpm->i2c_reg == NULL) {
+		ret = -EINVAL;
+		goto out_ram;
+	}
+
+	data = of_get_property(ofdev->node, "fsl,cpm-command", &len);
+	if (!data || len != 4) {
+		ret = -EINVAL;
+		goto out_reg;
+	}
+	cpm->cp_command = *data;
+
+	data = of_get_property(ofdev->node, "linux,i2c-class", &len);
+	if (data && len == 4)
+		cpm->adap.class = *data;
+
+	/*
+	 * Allocate space for CPM_MAXBD transmit and receive buffer
+	 * descriptors in the DP ram.
+	 */
+	cpm->dp_addr = cpm_muram_alloc(sizeof(cbd_t) * 2 * CPM_MAXBD, 8);
+	if (!cpm->dp_addr) {
+		ret = -ENOMEM;
+		goto out_reg;
+	}
+
+	cpm->tbase = cpm_muram_addr(cpm->dp_addr);
+	cpm->rbase = cpm_muram_addr(cpm->dp_addr + sizeof(cbd_t) * CPM_MAXBD);
+
+	/* Allocate TX and RX buffers */
+
+	tbdf = cpm->tbase;
+	rbdf = cpm->rbase;
+
+	for (i = 0; i < CPM_MAXBD; i++) {
+		cpm->rxbuf[i] = dma_alloc_coherent(
+			NULL, CPM_MAX_READ + 1, &cpm->rxdma[i], GFP_KERNEL);
+		if (!cpm->rxbuf[i]) {
+			ret = -ENOMEM;
+			goto out_muram;
+		}
+		out_be32(&rbdf[i].cbd_bufaddr, ((cpm->rxdma[i] + 1) & ~1));
+
+		cpm->txbuf[i] = (unsigned char *)dma_alloc_coherent(
+			NULL, CPM_MAX_READ + 1, &cpm->txdma[i], GFP_KERNEL);
+		if (!cpm->txbuf[i]) {
+			ret = -ENOMEM;
+			goto out_muram;
+		}
+		out_be32(&tbdf[i].cbd_bufaddr, cpm->txdma[i]);
+	}
+
+	/* Initialize Tx/Rx parameters. */
+
+	cpm_reset_i2c_params(cpm);
+
+	dev_dbg(&cpm->ofdev->dev, "i2c_ram %p, i2c_addr 0x%04x\n",
+		cpm->i2c_ram, cpm->i2c_addr);
+	dev_dbg(&cpm->ofdev->dev, "tbase 0x%04x, rbase 0x%04x\n",
+		(u8 __iomem *)cpm->tbase - DPRAM_BASE,
+		(u8 __iomem *)cpm->rbase - DPRAM_BASE);
+
+	cpm_command(cpm->cp_command, CPM_CR_INIT_TRX);
+
+	/*
+	 * Select an invalid address. Just make sure we don't use loopback mode
+	 */
+	out_8(&cpm->i2c_reg->i2add, 0xfe);
+
+	/* Make clock run at 60 kHz. */
+
+	brg = get_brgfreq() / (32 * 2 * 60000) - 3;
+	out_8(&cpm->i2c_reg->i2brg, brg);
+
+	out_8(&cpm->i2c_reg->i2mod, 0x00);
+	out_8(&cpm->i2c_reg->i2com, I2COM_MASTER);	/* Master mode */
+
+	/* Disable interrupts. */
+	out_8(&cpm->i2c_reg->i2cmr, 0);
+	out_8(&cpm->i2c_reg->i2cer, 0xff);
+
+	return 0;
+
+out_muram:
+	for (i = 0; i < CPM_MAXBD; i++) {
+		if (cpm->rxbuf[i])
+			dma_free_coherent(NULL, CPM_MAX_READ + 1,
+				cpm->rxbuf[i], cpm->rxdma[i]);
+		if (cpm->txbuf[i])
+			dma_free_coherent(NULL, CPM_MAX_READ + 1,
+				cpm->txbuf[i], cpm->txdma[i]);
+	}
+	cpm_muram_free(cpm->dp_addr);
+out_reg:
+	iounmap(cpm->i2c_reg);
+out_ram:
+	if ((cpm->version == 1) && (!cpm->i2c_addr))
+		iounmap(cpm->i2c_ram);
+	if (cpm->version == 2)
+		cpm_muram_free(cpm->i2c_addr);
+out_irq:
+	free_irq(cpm->irq, &cpm->adap);
+	return ret;
+}
+
+static void cpm_i2c_shutdown(struct cpm_i2c *cpm)
+{
+	int i;
+
+	/* Shut down I2C. */
+	clrbits8(&cpm->i2c_reg->i2mod, I2MOD_EN);
+
+	/* Disable interrupts */
+	out_8(&cpm->i2c_reg->i2cmr, 0);
+	out_8(&cpm->i2c_reg->i2cer, 0xff);
+
+	free_irq(cpm->irq, &cpm->adap);
+
+	/* Free all memory */
+	for (i = 0; i < CPM_MAXBD; i++) {
+		dma_free_coherent(NULL, CPM_MAX_READ + 1,
+			cpm->rxbuf[i], cpm->rxdma[i]);
+		dma_free_coherent(NULL, CPM_MAX_READ + 1,
+			cpm->txbuf[i], cpm->txdma[i]);
+	}
+
+	cpm_muram_free(cpm->dp_addr);
+	iounmap(cpm->i2c_reg);
+
+	if ((cpm->version == 1) && (!cpm->i2c_addr))
+		iounmap(cpm->i2c_ram);
+	if (cpm->version == 2)
+		cpm_muram_free(cpm->i2c_addr);
+
+	return;
+}
+
+static int __devinit cpm_i2c_probe(struct of_device *ofdev,
+			 const struct of_device_id *match)
+{
+	int result;
+	struct cpm_i2c *cpm;
+
+	cpm = kzalloc(sizeof(struct cpm_i2c), GFP_KERNEL);
+	if (!cpm)
+		return -ENOMEM;
+
+	cpm->ofdev = ofdev;
+
+	dev_set_drvdata(&ofdev->dev, cpm);
+
+	cpm->adap = cpm_ops;
+	i2c_set_adapdata(&cpm->adap, cpm);
+	cpm->adap.dev.parent = &ofdev->dev;
+
+	result = cpm_i2c_setup(cpm);
+	if (result) {
+		dev_err(&ofdev->dev, "Unable to init hardware\n");
+		goto out_free;
+	}
+
+	/* register new adapter to i2c module... */
+
+	result = i2c_add_adapter(&cpm->adap);
+	if (result < 0) {
+		dev_err(&ofdev->dev, "Unable to register with I2C\n");
+		goto out_shut;
+	}
+
+	dev_dbg(&ofdev->dev, "hw routines for %s registered.\n",
+		cpm->adap.name);
+
+	/*
+	 * register OF I2C devices
+	 */
+	of_register_i2c_devices(&cpm->adap, ofdev->node);
+
+	return 0;
+out_shut:
+	cpm_i2c_shutdown(cpm);
+out_free:
+	dev_set_drvdata(&ofdev->dev, NULL);
+	kfree(cpm);
+
+	return result;
+}
+
+static int __devexit cpm_i2c_remove(struct of_device *ofdev)
+{
+	struct cpm_i2c *cpm = dev_get_drvdata(&ofdev->dev);
+
+	i2c_del_adapter(&cpm->adap);
+
+	cpm_i2c_shutdown(cpm);
+
+	dev_set_drvdata(&ofdev->dev, NULL);
+	kfree(cpm);
+
+	return 0;
+}
+
+static const struct of_device_id cpm_i2c_match[] = {
+	{
+		.compatible = "fsl,cpm-i2c",
+	},
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, cpm_i2c_match);
+
+static struct of_platform_driver cpm_i2c_driver = {
+	.match_table	= cpm_i2c_match,
+	.probe		= cpm_i2c_probe,
+	.remove		= __devexit_p(cpm_i2c_remove),
+	.driver		= {
+		.name	= "fsl-i2c-cpm",
+		.owner	= THIS_MODULE,
+	}
+};
+
+static int __init cpm_i2c_init(void)
+{
+	return of_register_platform_driver(&cpm_i2c_driver);
+}
+
+static void __exit cpm_i2c_exit(void)
+{
+	of_unregister_platform_driver(&cpm_i2c_driver);
+}
+
+module_init(cpm_i2c_init);
+module_exit(cpm_i2c_exit);
+
+MODULE_AUTHOR("Jochen Friedrich <jochen@scram.de>");
+MODULE_DESCRIPTION("I2C-Bus adapter routines for CPM boards");
+MODULE_LICENSE("GPL");
-- 
1.5.5.1

^ permalink raw reply related

* Re: [BUG] 2.6.25-rc2-git4 - Regression Kernel oops  while running kernbench and tbench on powerpc
From: Kamalesh Babulal @ 2008-05-10 16:43 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev, Andrew Morton, linux-next, kernel list
In-Reply-To: <18467.49613.367933.672004@cargo.ozlabs.ibm.com>

Paul Mackerras wrote:
> Kamalesh Babulal writes:
> 
>> Thanks, after applying the patch the oops is not reproducible on the machine. The console
>> log had no message starting with SLB: or FWNMI:. I have updated the bugzilla also.
>>
>> Tested-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
> 
> Could you test Linus' current git tree and see if you can reproduce
> the same problem now?  The patch I sent upstream was a little
> different from the one you tested, though it should have the same
> effect, and I would like to be sure that it is just as effective at
> fixing the bug.
> 
> Thanks,
> Paul.

Hi Paul,

The patch has the same effect. I tested the 2.6.26-rc1-git7 kernel and
the oops is not reproducible.

-- 
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.

^ permalink raw reply

* Re: [Cbe-oss-dev] [PATCH] Updated: Reworked Cell OProfile: SPU mutex lock fix
From: Christoph Hellwig @ 2008-05-10 19:07 UTC (permalink / raw)
  To: Robert Richter
  Cc: Arnd Bergmann, linux-kernel, linuxppc-dev, oprofile-list,
	cbe-oss-dev, Carl Love
In-Reply-To: <20080509150759.GL24041@erda.amd.com>

> > +	/* Ignoring the return value from the unregister
> > +	 * call.  A failed return value simply says there
> > +	 * was no registered event.  Hence there will not
> > +	 * be any calls to process a switch event that
> > +	 * could cause a problem.
> > +	 */
> > +	spu_switch_event_unregister(&spu_active);
> 
> Better to use this here, to show the return value is ignored:
> 
>        (void)spu_switch_event_unregister(...)

Actually Linux style is to not add those casts.  But I don't think we
all the notifier_chain_unregister funtion should return error at all,
we should probably fix that up in the core code.

^ permalink raw reply

* Re: patch to install unstripped vDSO on disk breaks powerpc kernel build
From: Roland McGrath @ 2008-05-11  0:40 UTC (permalink / raw)
  To: Chris Friesen; +Cc: linuxppc-dev, paulus
In-Reply-To: <482527F3.60405@nortel.com>

Ok.  That looks like a bug in the older binutils (objcopy) you are using.
It is confused by the empty .rela.dyn section right next to the .dynamic
section.  Current binutils don't seem to have a problem with this.

I haven't tried to get an old binutils running to reproduce this.
I suspect the following change will work around the problem.
It should not cause any problem with newer or older binutils.


Thanks,
Roland

---
[PATCH] powerpc vdso64 linker script tweak

This should work around bugs in older binutils' objcopy.
The placement of these sections does not really matter,
but it confused the buggy old BFD libraries.

Signed-off-by: Roland McGrath <roland@redhat.com>
---
 arch/powerpc/kernel/vdso64/vdso64.lds.S |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/kernel/vdso64/vdso64.lds.S b/arch/powerpc/kernel/vdso64/vdso64.lds.S
index 932b3fd..7d6585f 100644
--- a/arch/powerpc/kernel/vdso64/vdso64.lds.S
+++ b/arch/powerpc/kernel/vdso64/vdso64.lds.S
@@ -43,15 +43,15 @@ SECTIONS
 	.rodata		: { *(.rodata .rodata.* .gnu.linkonce.r.*) }
 	.rodata1	: { *(.rodata1) }
 
+	.dynamic	: { *(.dynamic) }		:text	:dynamic
+
 	.eh_frame_hdr	: { *(.eh_frame_hdr) }		:text	:eh_frame_hdr
 	.eh_frame	: { KEEP (*(.eh_frame)) }	:text
 	.gcc_except_table : { *(.gcc_except_table) }
+	.rela.dyn ALIGN(8) : { *(.rela.dyn) }
 
 	.opd ALIGN(8)	: { KEEP (*(.opd)) }
 	.got ALIGN(8)	: { *(.got .toc) }
-	.rela.dyn ALIGN(8) : { *(.rela.dyn) }
-
-	.dynamic	: { *(.dynamic) }		:text	:dynamic
 
 	_end = .;
 	PROVIDE(end = .);

^ permalink raw reply related

* Re: Fix arch/ppc builds
From: Josh Boyer @ 2008-05-11 21:13 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev
In-Reply-To: <1210114730-5047-1-git-send-email-segher@kernel.crashing.org>

On Wed,  7 May 2008 00:58:47 +0200
Segher Boessenkool <segher@kernel.crashing.org> wrote:

> 
> These three trivial patches make arch/ppc build again.

We should either take these for 2.6.26, or drop arch/ppc altogether.
Leaving it in-tree but broken just seems like bad form :).

josh

^ permalink raw reply

* Re: [PATCH] [POWERPC] More useful cputable defaults
From: David Gibson @ 2008-05-12  1:33 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <20080505052405.23E38DDE0A@ozlabs.org>

On Mon, May 05, 2008 at 03:22:27PM +1000, Benjamin Herrenschmidt wrote:
> Changes the cputable so that various CPU families that have an exclusive
> CONFIG_ option have a more sensible default entry to patch if the specific
> processor hasn't been identified.
> 
> This makes the kernel more generally useful when booted on an unknown
> PVR for things like new 4xx variants.

This patch (as commit 76bc080ef5a34aedb63e1691f28c6b42f3468e4e) leaves
the last cputable entry for E200 and E500 without a closing brace.

[...]
> -#elif defined(CONFIG_E500)
> +	{	/* default match */
> +		.pvr_mask		= 0x00000000,
> +		.pvr_value		= 0x00000000,
> +		.cpu_name		= "(generic E200 PPC)",
> +		.cpu_features		= CPU_FTRS_E200,
> +		.cpu_user_features	= COMMON_USER_BOOKE |
> +			PPC_FEATURE_HAS_EFP_SINGLE |
> +			PPC_FEATURE_UNIFIED_CACHE,
> +		.dcache_bsize		= 32,
> +		.machine_check		= machine_check_e200,
> +		.platform		= "ppc5554",

-> here

> +#endif /* CONFIG_E200 */
> +#ifdef CONFIG_E500

[snip]
> -#if !CLASSIC_PPC
>  	{	/* default match */
>  		.pvr_mask		= 0x00000000,
>  		.pvr_value		= 0x00000000,
> -		.cpu_name		= "(generic PPC)",
> -		.cpu_features		= CPU_FTRS_GENERIC_32,
> -		.cpu_user_features	= PPC_FEATURE_32,
> +		.cpu_name		= "(generic E500 PPC)",
> +		.cpu_features		= CPU_FTRS_E500,
> +		.cpu_user_features	= COMMON_USER_BOOKE |
> +			PPC_FEATURE_HAS_SPE_COMP |
> +			PPC_FEATURE_HAS_EFP_SINGLE_COMP,
>  		.icache_bsize		= 32,
>  		.dcache_bsize		= 32,
> +		.machine_check		= machine_check_e500,
>  		.platform		= "powerpc",
> -	}

-> and here.

> -#endif /* !CLASSIC_PPC */
> +#endif /* CONFIG_E500 */
>  #endif /* CONFIG_PPC32 */
>  };

-- 
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

^ permalink raw reply

* Re: MPC5200b MMC over SPI into PSC6
From: Fabio Tosetto @ 2008-05-12  8:51 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, Fabri
In-Reply-To: <fa686aa40805090820s66801309j161adfcbc360fc42@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4762 bytes --]

Hello,

in uboot i have setting the bootargs variable:

=> bootargs debug console=ttyPSC0,115200 root=/dev/ram
=> saveenv

If I'm not wrong, the right sequence of commands should be the following:

$ make ARCH=powerpc mpc5200_defconfig
$ make ARCH=powerpc menuconfig
.. [customizations]...
$ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- cuImage.lite5200b

and this is the output:
..
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/linux/compile.h
  CALL    arch/powerpc/kernel/systbl_chk.sh
  WRAP    arch/powerpc/boot/cuImage.lite5200b
DTC: dts->dtb  on file
"/home/ftosetto/linux-2.6.25.2-lite5200/arch/powerpc/boot/dts/lite5200b.dts"
Image Name:   Linux-2.6.25.2
Created:      Mon May  12 10:29:40 2008
Image Type:   PowerPC Linux Kernel Image (gzip compressed)
Data Size:    1518744 Bytes = 1483.15 kB = 1.45 MB
Load Address: 0x00400000
Entry Point:  0x00400550


At this point I've loaded the cuImage and rootfs.uimage on the board:

=> usb start
=> usb scan
=> fatload usb 0 0x03000000 cuImage.lite5200b
=> fatload usb 0 0x04000000 rootfs.uimage
=> bootm 0x03000000 0x04000000

but it still hangs after this:

## Booting image at 03000000 
...                                               
   Image Name:   
Linux-2.6.25.2                                                
   Created:      2008-05-12   7:39:07 
UTC                                      
   Image Type:   PowerPC Linux Kernel Image (gzip 
compressed)                  
   Data Size:    1589091 Bytes =  1.5 
MB                                       
   Load Address: 
00400000                                                      
   Entry Point:  
00400550                                                      
   Verifying Checksum ... 
OK                                                   
   Uncompressing Kernel Image ... 
OK                                           
## Loading RAMDisk Image at 04000000 
...                                       
   Image Name:   RamDisk Image 
RadioNav                                        
   Created:      2007-10-24  15:48:39 
UTC                                      
   Image Type:   PowerPC Linux RAMDisk Image (gzip 
compressed)                 
   Data Size:    1839123 Bytes =  1.8 
MB                                       
   Load Address: 
00000000                                                      
   Entry Point:  
00000000                                                      
   Verifying Checksum ... 
OK                                                   
   Loading Ramdisk to 0fd89000, end 0ff4a013 ... 
OK                            
Memory <- <0x0 0x10000000> 
(256MB)                                             
CPU clock-frequency <- 0xbcd3d80 
(198MHz)                                      
CPU timebase-frequency <- 0x1f78a40 
(33MHz)                                    
CPU bus-frequency <- 0x7de2900 
(132MHz)                                        
                                                                                

zImage starting: loaded at 0x00400000 (sp: 
0x0ff4a958)                         
Allocating 0x34d42c bytes for kernel 
...                                       
gunzipping (0x00000000 <- 0x0040d000:0x007510f0)...done 0x32d150 
bytes         
Using loader supplied ramdisk at 
0xfd89000-0xff4a013                           
initrd head: 
0x1f8b0808                                                        
                                                                                

Linux/PowerPC load: debug console=ttyPSC0,115200 root=/dev/ram
Finalizing device tree... flat tree at 0x75e300

Where is the problem? The problem is the my rootfs.uimage?

Do you have any idea?
Best regards,
Fabio

Grant Likely ha scritto:
> On Fri, May 9, 2008 at 9:02 AM, Fabri <rider4ever@gmail.com> wrote:
>   
>> Thanks for the patches, now some more rows are printed after RamDisk loading:
>>
>>   Verifying Checksum ... OK
>>   Loading Ramdisk to 0fe68000, end 0ff49bf2 ... OK
>> Memory <- <0x0 0x10000000> (256MB)
>> CPU clock-frequency <- 0xbcd3d80 (198MHz)
>> CPU timebase-frequency <- 0x1f78a40 (33MHz)
>> CPU bus-frequency <- 0x7de2900 (132MHz)
>>
>> zImage starting: loaded at 0x00400000 (sp: 0x0ff4a958)
>> Allocating 0x32d410 bytes for kernel ...
>> gunzipping (0x00000000 <- 0x0040d000:0x00730fd4)...done 0x30d150 bytes
>> Using loader supplied ramdisk at 0xfe68000-0xff49bf2
>> initrd head: 0x1f8b0808
>>
>> Linux/PowerPC load:
>>     
>                       ^^^^^^^^^^^^^^^^^^
>
> Doesn't look like you are passing a kernel parameters line.  The
> kernel probably is booting, but doesn't know where to output the
> console.  Try adding "console=ttyPSC0,115200".
>
> Cheers,
> g.
>
>   
>
>   


[-- Attachment #2: Type: text/html, Size: 12231 bytes --]

^ permalink raw reply

* Compiling applications using cross compiler packs libc
From: Ramkumar J @ 2008-05-12  9:12 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]

Hi All,

I am trying to execute a compiled simple stand-alone application (
TestApp_Memory.c compiled with gcc 4.1.0 cross compiler for ppc [ I have
installed this through crosstool on a Linux PC ] ) on the ML403 Board
instead of using the compiler-set provided by XPS. I tried many options (
like --static to gcc) to make the object file little as produced by the XPS
Compiler Set. I find that when static is provided, the glibc is also packed
up as a part of application though I never make any calls to the glibc
libraries. If I dont provide the --static, the gcc produces a code assuming
the library as shared and hence I get an interp section.
Is there any way to produce the code  with only the application and NOT the
glibc ( As XPS compilers does). Am I missing out something. Is there any
specific flags. I find even nodefaultlib does not work.

For Eg: This is another example I tried

int main()
{
    int a = 5;
    int b = 10;
    int c = 15;

    c = a + b;

    c += 12;

    return 0;
}

With --static compilation, size is about 500K for the above code though the
useful content is too less. objdump reveals unneccessary calls to the libc.
Any suggestions would be helpful.

Thanks and Regards,
Ramkumar

[-- Attachment #2: Type: text/html, Size: 1415 bytes --]

^ permalink raw reply

* Re: Compiling applications using cross compiler packs libc
From: Marco Stornelli @ 2008-05-12 10:02 UTC (permalink / raw)
  To: Ramkumar J; +Cc: linuxppc-embedded
In-Reply-To: <4f8c3030805120212r730ded9dv23dfcc29119ebfe5@mail.gmail.com>

Ramkumar J ha scritto:
> Hi All,
> 
> I am trying to execute a compiled simple stand-alone application (
> TestApp_Memory.c compiled with gcc 4.1.0 cross compiler for ppc [ I have
> installed this through crosstool on a Linux PC ] ) on the ML403 Board
> instead of using the compiler-set provided by XPS. I tried many options (
> like --static to gcc) to make the object file little as produced by the XPS
> Compiler Set. I find that when static is provided, the glibc is also packed
> up as a part of application though I never make any calls to the glibc
> libraries. If I dont provide the --static, the gcc produces a code assuming
> the library as shared and hence I get an interp section.
> Is there any way to produce the code  with only the application and NOT the
> glibc ( As XPS compilers does). Am I missing out something. Is there any
> specific flags. I find even nodefaultlib does not work.
> 
> For Eg: This is another example I tried
> 
> int main()
> {
>     int a = 5;
>     int b = 10;
>     int c = 15;
> 
>     c = a + b;
> 
>     c += 12;
> 
>     return 0;
> }
> 
> With --static compilation, size is about 500K for the above code though the
> useful content is too less. objdump reveals unneccessary calls to the libc.
> Any suggestions would be helpful.
> 
> Thanks and Regards,
> Ramkumar
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
You shouldn't use --static but -Os to have a "little" program. With 
static you include all the libraries in your application therefore you 
have a bigger application. In addition libc are basic libraries so you 
have to use it. If you have size problems you can use uclibc.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox