Re: Image generation for Efika is broken in 2.6.26
Robert Schwebel wrote: > On Tue, Jun 10, 2008 at 03:08:05PM -0400, Jon Smirl wrote: >>> I'm trying to convince OSELAS to rebuild the toolchain on Ubuntu >>> hardy but I'm having problems. >> After much mucking with my toolchain, I got it built with bin-utils >> 2.18. That fixed the Efika problem. Thanks for the tip. > > Marc, do we have a fix for that 2.17 problem? No, I just have heard yesterday that there is a problem, but have not seen any further details (I'm not reading this list). Is there a fix w/o update binutils to 2.18? Marc -- Marc Kleine-Budde Phone: +49-231-2826-924 Pengutronix - Linux Solutions for Science and Industry Vertretung West/Dortmund http://www.pengutronix.de signature.asc Description: OpenPGP digital signature ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: MMIO and gcc re-ordering issue
Nick Piggin writes: > Now that doesn't leave waker ordering architectures lumped with "slow old > x86 semantics". Think of it as giving them the benefit of sharing x86 > development and testing :) Worth something, but not perhaps as much as you think, given that many x86 driver writers still don't pay much attention to making their code endian-safe and 64-bit-clean. And there are still plenty of drivers that use virt_to_bus... Paul. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
linux-next: powerpc build failure
Hi all, Today's linux-next build (powerpc allyesconfig) failed like this: vmlinux.o: In function `ipx_ioctl': /scratch/sfr/next/net/ipx/af_ipx.c:1830: relocation truncated to fit: R_PPC64_REL24 against symbol `._mcount' defined in .text section in vmlinux.o (and lots more similar) I am assuming that this has something to do with how big vmlinux is for allyesconfig and the addition of -pg to KBUILD_CFLAGS for ftrace. -- Cheers, Stephen Rothwell[EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/ pgpWJEfnufvGy.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: linux-next: powerpc build failure
* Stephen Rothwell <[EMAIL PROTECTED]> wrote: > Hi all, > > Today's linux-next build (powerpc allyesconfig) failed like this: > > vmlinux.o: In function `ipx_ioctl': > /scratch/sfr/next/net/ipx/af_ipx.c:1830: relocation truncated to fit: > R_PPC64_REL24 against symbol `._mcount' defined in .text section in vmlinux.o > > (and lots more similar) > > I am assuming that this has something to do with how big vmlinux is > for allyesconfig and the addition of -pg to KBUILD_CFLAGS for ftrace. could this be a tool chain limitation perhaps, or a gcc bug? Or does the allyesconfig size go beyond some fundamental hardware limitation. (i doubt it's the latter) Ingo ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Please pull 'for-2.6.26' branch of 4xx tree
Hi Paul, Please pull from: master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git for-2.6.26 to get one commit from Grant that fixes simpleImage targets. It seems both of us missed this when Grant sent it out a while ago. The tree is based off of Linus' current tree as of this morning. josh Grant Likely (1): [POWERPC] bootwrapper: add simpleImage* to list of boot targets arch/powerpc/Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 4/7] [POWERPC] QE: implement support for the GPIO LIB API
On Tue, Jun 10, 2008 at 11:15:08AM -0500, Kumar Gala wrote: > > On May 19, 2008, at 12:47 PM, Anton Vorontsov wrote: > >> This is needed to access QE GPIOs via Linux GPIO API. >> >> Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> >> Acked-By: Timur Tabi <[EMAIL PROTECTED]> >> --- >> Documentation/powerpc/booting-without-of.txt | 27 + >> arch/powerpc/sysdev/qe_lib/Kconfig |9 ++ >> arch/powerpc/sysdev/qe_lib/Makefile |1 + >> arch/powerpc/sysdev/qe_lib/gpio.c| 146 + >> + >> include/asm-powerpc/qe.h |3 + >> 5 files changed, 186 insertions(+), 0 deletions(-) >> create mode 100644 arch/powerpc/sysdev/qe_lib/gpio.c > > applied. I've just rebased on the pushed out powerpc-next branch, and noticed that you merged this patch from the old series. The difference is in absence of arch_initcall() for QE GPIOs initialization, i.e. in this version boards should explicitly call qe_add_gpiochips(). So.. was this done deliberately? Or should I send you an update? -- Anton Vorontsov email: [EMAIL PROTECTED] irc://irc.freenode.net/bd2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] powerpc/QE: qe_reset should be __init
This patch fixes following section mismatch: WARNING: arch/powerpc/sysdev/built-in.o(.text+0x11d8): Section mismatch in reference from the function qe_reset() to the function .init.text:cpm_muram_init() Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- arch/powerpc/sysdev/qe_lib/qe.c |2 +- include/asm-powerpc/qe.h|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c index 28e05df..9e82d7e 100644 --- a/arch/powerpc/sysdev/qe_lib/qe.c +++ b/arch/powerpc/sysdev/qe_lib/qe.c @@ -87,7 +87,7 @@ phys_addr_t get_qe_base(void) EXPORT_SYMBOL(get_qe_base); -void qe_reset(void) +void __init qe_reset(void) { if (qe_immr == NULL) qe_immr = ioremap(get_qe_base(), QE_IMMAP_SIZE); diff --git a/include/asm-powerpc/qe.h b/include/asm-powerpc/qe.h index 80807fd..1355e72 100644 --- a/include/asm-powerpc/qe.h +++ b/include/asm-powerpc/qe.h @@ -84,7 +84,7 @@ static inline bool qe_clock_is_brg(enum qe_clock clk) extern spinlock_t cmxgcr_lock; /* Export QE common operations */ -extern void qe_reset(void); +extern void __init qe_reset(void); /* QE PIO */ #define QE_PIO_PINS 32 -- 1.5.5.4 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Patches added to 4xx 'next' branch
The following patches have been added to the 'next' branch of the 4xx tree. As usual, I will let them sit there for a few days and then ask Paul to pull. If I've missed any patches for 2.6.27, now would be the time to point them out to me. josh Giuseppe Coviello (2): powerpc/4xx: Sam440ep support powerpc/4xx: Convert Sam440ep DTS to dts-v1 Imre Kaloz (1): powerpc/4xx: MTD support for the AMCC Taishan Board Josh Boyer (1): Revert "[POWERPC] 4xx: Fix 460GT support to not enable FPU" Stefan Roese (1): powerpc/4xx: PCIe driver now detects if a port is disabled via the dev-tre Valentine Barshak (1): powerpc/4xx: Fix resource issue in warp-nand.c ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH v3] powerpc/83xx: update mpc83xx_defconfig to support MPC8360E-RDK
This patch updates mpc83xx_defconfig to support MPC8360E-RDK board. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- Completely forgot about BROADCOM_PHY, added now. Without it, only u-boot initialized BCM PHY will work, second one will unable to receive/transmit any data. arch/powerpc/configs/mpc83xx_defconfig | 67 +--- 1 files changed, 61 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/configs/mpc83xx_defconfig b/arch/powerpc/configs/mpc83xx_defconfig index 4293c8b..0e16364 100644 --- a/arch/powerpc/configs/mpc83xx_defconfig +++ b/arch/powerpc/configs/mpc83xx_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.26-rc5 -# Mon Jun 9 08:52:14 2008 +# Wed Jun 11 15:35:09 2008 # # CONFIG_PPC64 is not set @@ -38,6 +38,7 @@ CONFIG_ARCH_HAS_ILOG2_U32=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_GPIO=y # CONFIG_ARCH_NO_VIRT_TO_BUS is not set CONFIG_PPC=y CONFIG_EARLY_PRINTK=y @@ -166,6 +167,7 @@ CONFIG_MPC832x_RDB=y CONFIG_MPC834x_MDS=y CONFIG_MPC834x_ITX=y CONFIG_MPC836x_MDS=y +CONFIG_MPC836x_RDK=y CONFIG_MPC837x_MDS=y CONFIG_MPC837x_RDB=y CONFIG_SBC834x=y @@ -241,6 +243,8 @@ CONFIG_ZONE_DMA=y CONFIG_GENERIC_ISA_DMA=y CONFIG_PPC_INDIRECT_PCI=y CONFIG_FSL_SOC=y +CONFIG_FSL_LBC=y +CONFIG_FSL_GTM=y # CONFIG_PCI is not set # CONFIG_PCI_DOMAINS is not set # CONFIG_PCI_SYSCALL is not set @@ -356,7 +360,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set +CONFIG_FW_LOADER=y # CONFIG_SYS_HYPERVISOR is not set # CONFIG_CONNECTOR is not set CONFIG_MTD=y @@ -398,7 +402,7 @@ CONFIG_MTD_CFI_I1=y CONFIG_MTD_CFI_I2=y # CONFIG_MTD_CFI_I4 is not set # CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_CFI_INTELEXT is not set +CONFIG_MTD_CFI_INTELEXT=y CONFIG_MTD_CFI_AMDSTD=y # CONFIG_MTD_CFI_STAA is not set CONFIG_MTD_CFI_UTIL=y @@ -438,6 +442,7 @@ CONFIG_MTD_NAND_IDS=y # CONFIG_MTD_NAND_PLATFORM is not set # CONFIG_MTD_ALAUDA is not set CONFIG_MTD_NAND_FSL_ELBC=y +CONFIG_MTD_NAND_FSL_UPM=y # CONFIG_MTD_ONENAND is not set # @@ -445,6 +450,7 @@ CONFIG_MTD_NAND_FSL_ELBC=y # # CONFIG_MTD_UBI is not set CONFIG_OF_DEVICE=y +CONFIG_OF_GPIO=y CONFIG_OF_I2C=y # CONFIG_PARPORT is not set CONFIG_BLK_DEV=y @@ -535,7 +541,7 @@ CONFIG_DAVICOM_PHY=y # CONFIG_CICADA_PHY is not set CONFIG_VITESSE_PHY=y # CONFIG_SMSC_PHY is not set -# CONFIG_BROADCOM_PHY is not set +CONFIG_BROADCOM_PHY=y CONFIG_ICPLUS_PHY=y # CONFIG_REALTEK_PHY is not set # CONFIG_FIXED_PHY is not set @@ -636,7 +642,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4 CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_OF_PLATFORM is not set -# CONFIG_SERIAL_QE is not set +CONFIG_SERIAL_QE=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 @@ -655,6 +661,7 @@ CONFIG_I2C_CHARDEV=y # # I2C Hardware Bus support # +# CONFIG_I2C_GPIO is not set CONFIG_I2C_MPC=y # CONFIG_I2C_OCORES is not set # CONFIG_I2C_PARPORT_LIGHT is not set @@ -672,6 +679,7 @@ 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 @@ -679,6 +687,21 @@ CONFIG_I2C_MPC=y # CONFIG_I2C_DEBUG_BUS is not set # CONFIG_I2C_DEBUG_CHIP is not set # CONFIG_SPI is not set +CONFIG_HAVE_GPIO_LIB=y + +# +# GPIO Support +# + +# +# I2C GPIO expanders: +# +# CONFIG_GPIO_PCA953X is not set +# CONFIG_GPIO_PCF857X is not set + +# +# SPI GPIO expanders: +# # CONFIG_W1 is not set # CONFIG_POWER_SUPPLY is not set CONFIG_HWMON=y @@ -780,13 +803,43 @@ CONFIG_DAB=y # # CONFIG_VGASTATE is not set CONFIG_VIDEO_OUTPUT_CONTROL=m -# 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=y +CONFIG_FB_BOTH_ENDIAN=y +# CONFIG_FB_BIG_ENDIAN is not set +# CONFIG_FB_LITTLE_ENDIAN is not set +# CONFIG_FB_SYS_FOPS is not set +# CONFIG_FB_SVGALIB is not set +CONFIG_FB_MACMODES=y +# 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_OF=y +# CONFIG_FB_VGA16 is not set +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_FSL_DIU is not set +# CONFIG_FB_IBM_GXT4500 is not set +# CONFIG_FB_VIRTUAL is not set # CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Display device support # # CONFIG_DISPLAY_SUPPORT is not set +# CONFIG_LOGO is not set # # Sound @@ -1012,8 +1065,10 @@ CONFIG_MSDOS_PART
Re: Image generation for Efika is broken in 2.6.26
Scott Wood wrote: > On Tue, Jun 10, 2008 at 10:38:31AM -0400, Jon Smirl wrote: >> Why is my vmlinux.strip 3.2GB? Could a missing address be interpreted >> as -1 (0xFFF..) and cause the image to contain all of memory? >> >> -rw-r--r-- 1 jonsmirl jonsmirl 61738015 2008-06-10 10:31 vmlinux.o >> -rwxr-xr-x 1 jonsmirl jonsmirl 3224175192 2008-06-10 10:31 >> vmlinux.strip.3651 >> >> After it is packed vmlinux is 32MB. Packing gigabytes of zeros, maybe? >> >> -rwxr-xr-x 1 jonsmirl jonsmirl 32430673 2008-06-10 10:31 vmlinux >> >> This image won't load onto the Efika probably because it is trying to >> expand back to 3.2GB. >> >> With the same .config vmlinux is 4.1MB on 2.6.25 >> >> -rwxr-xr-x 1 jonsmirl jonsmirl 4119174 2008-06-09 20:09 vmlinux > > Are you using binutils 2.17? It has a bug that was triggered by the p_paddr > change. Do you get a bunch of warnings from the strip command? Same problem here with binutils-2.17. But no warnings from strip. Can you give me some pointers to the original bug report or the fix of the problem in the binutils svn. I've searched this mailinglist and the binutils bugzilla, but without success. cheers, Marc -- Marc Kleine-Budde Phone: +49-231-2826-924 Pengutronix - Linux Solutions for Science and Industry Vertretung West/Dortmund http://www.pengutronix.de signature.asc Description: OpenPGP digital signature ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] prtlvt board support (MPC5121e) added
On Wed, Jun 11, 2008 at 3:41 AM, David Jander <[EMAIL PROTECTED]> wrote: > On Tuesday 10 June 2008 22:37:18 you wrote: >> Thanks for the patch, comments below. >> > --- /dev/null >> > +++ b/arch/powerpc/platforms/512x/prtlvt.c >> >> Looks like you've just duplicated mpc5121_ads.c. You should just add >> your boards name to the mpc5121_ads_probe function. Bonus points if >> you rename the .c file to something more generic. You only need a new >> board file if your board needs something special. > > Well, it looks like mpc5121_ads.c is pretty generic. The MPC5121 is almost > a "motherboard-in-a-chip" type of SoC, so there isn't much board-specific > stuff anywhere. IO-control register setup should be done in the boot-loader. > What should we do about this then? Rename the whole mpc5121_ads stuff to > something more generic? What about calling it "mpc5121_generic.c"? mpc5121_generic.c works for me. > Btw, you posted this to linucppc-dev mailing list, but I think that was a > mistake, since this is clearly an embedded processor, so I removed the CC. Nope, not a mistake. Discussions on embedded stuff is welcome on the linuxppc-dev mailing list. There has been some talk of removing the linuxppc-embedded list entirely. I've added the list back to the to: list. Cheers, g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 4/7] [POWERPC] QE: implement support for the GPIO LIB API
On Jun 11, 2008, at 7:29 AM, Anton Vorontsov wrote: On Tue, Jun 10, 2008 at 11:15:08AM -0500, Kumar Gala wrote: On May 19, 2008, at 12:47 PM, Anton Vorontsov wrote: This is needed to access QE GPIOs via Linux GPIO API. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> Acked-By: Timur Tabi <[EMAIL PROTECTED]> --- Documentation/powerpc/booting-without-of.txt | 27 + arch/powerpc/sysdev/qe_lib/Kconfig |9 ++ arch/powerpc/sysdev/qe_lib/Makefile |1 + arch/powerpc/sysdev/qe_lib/gpio.c| 146 +++ ++ + include/asm-powerpc/qe.h |3 + 5 files changed, 186 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/sysdev/qe_lib/gpio.c applied. I've just rebased on the pushed out powerpc-next branch, and noticed that you merged this patch from the old series. The difference is in absence of arch_initcall() for QE GPIOs initialization, i.e. in this version boards should explicitly call qe_add_gpiochips(). So.. was this done deliberately? Or should I send you an update? just send me an update to my tree at this point. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
RE: [RFC] Kprobes for book-e
Hi Kumar, I could switch to different version of binutils and boot the recent git for ebony target. The kprobes booke patches attached below got applied and i didnot see any issues. These patches can be now pushed to main line? Below is the revised patch set after addressing some cleanups in traps.c and bug fixes to kprobes.c discussed earlier. Also added the support to Documentation/kprobes.txt and KRETPROBES check in powerpc/Kconfig file. -Madhvesh - arch/powerpc/kernel/kprobes.c | 35 +++ arch/powerpc/kernel/misc_32.S |2 +- arch/powerpc/kernel/traps.c | 26 +- 3 files changed, 57 insertions(+), 6 deletions(-) Index: b/arch/powerpc/kernel/kprobes.c === --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c @@ -35,6 +35,21 @@ #include #include + +#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) +#define single_stepping(regs) (current->thread.dbcr0 & DBCR0_IC) +#define clear_single_step(regs)(current->thread.dbcr0 &= ~DBCR0_IC) +#else +#define single_stepping(regs) ((regs)->msr & MSR_SE) +#define clear_single_step(regs)((regs)->msr &= ~MSR_SE) +#endif + +#ifdef CONFIG_BOOKE +#define MSR_SINGLESTEP (MSR_DE) +#else +#define MSR_SINGLESTEP (MSR_SE) +#endif + DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); @@ -53,7 +68,8 @@ int __kprobes arch_prepare_kprobe(struct ret = -EINVAL; } - /* insn must be on a special executable page on ppc64 */ + /* insn must be on a special executable page on ppc64. This is +* explicitly not required on ppc32 (right now), but it doesn't hurt */ if (!ret) { p->ainsn.insn = get_insn_slot(); if (!p->ainsn.insn) @@ -95,7 +111,14 @@ void __kprobes arch_remove_kprobe(struct static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) { +#ifdef CONFIG_BOOKE + regs->msr &= ~(MSR_EE); /* Turn off 'Externel Interrupt' bits */ + regs->msr &= ~(MSR_CE); /* Turn off 'Critical Interrupt' bits */ + regs->msr |= MSR_DE; + mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) | DBCR0_IC | DBCR0_IDM); +#else regs->msr |= MSR_SE; +#endif /* * On powerpc we should single step on the original @@ -158,7 +181,7 @@ static int __kprobes kprobe_handler(stru kprobe_opcode_t insn = *p->ainsn.insn; if (kcb->kprobe_status == KPROBE_HIT_SS && is_trap(insn)) { - regs->msr &= ~MSR_SE; + regs->msr &= ~MSR_SINGLESTEP; /* Turn off 'trace' bits */ regs->msr |= kcb->kprobe_saved_msr; goto no_kprobe; } @@ -398,7 +421,7 @@ out: * will have SE set, in which case, continue the remaining processing * of do_debug, as if this is not a probe hit. */ - if (regs->msr & MSR_SE) + if (single_stepping(regs)) return 0; return 1; @@ -421,7 +444,7 @@ int __kprobes kprobe_fault_handler(struc * normal page fault. */ regs->nip = (unsigned long)cur->addr; - regs->msr &= ~MSR_SE; + regs->msr &= ~MSR_SINGLESTEP; /* Turn off 'trace' bits */ regs->msr |= kcb->kprobe_saved_msr; if (kcb->kprobe_status == KPROBE_REENTER) restore_previous_kprobe(kcb); Index: b/arch/powerpc/kernel/misc_32.S === --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S @@ -489,7 +489,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_UNIFIED_ID * * flush_icache_range(unsigned long start, unsigned long stop) */ -_GLOBAL(__flush_icache_range) +_KPROBE(__flush_icache_range) BEGIN_FTR_SECTION blr /* for 601, do nothing */ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE) Index: b/arch/powerpc/kernel/traps.c === --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -1030,7 +1030,7 @@ void SoftwareEmulation(struct pt_regs *r #if defined(CONFIG_40x) || defined(CONFIG_BOOKE) -void DebugException(struct pt_regs *regs, unsigned long debug_status) +void __kprobes DebugException(struct pt_regs *regs, unsigned long debug_status) { if (debug_status & DBSR_IC) { /* instruction completion */ regs->msr &= ~MSR_DE; @@ -1041,6 +1041,12 @@ void DebugException(struct pt_regs *regs mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) & ~DBCR0_IC); /* Clear the instruc
[PATCH] powerpc/4xx: Workaround for PPC440EPx/GRx PCI_28 Errata
The 440EPx/GRx chips don't support PCI MRM commands. Drivers determine this by looking for a zero value in the PCI cache line size register. However, some drivers write to this register upon initialization. This can cause MRMs to be used on these chips, which may cause deadlocks on PLB4. The workaround implemented here introduces a new indirect_type flag, called PPC_INDIRECT_TYPE_BROKEN_MRM. This is set in the pci_controller structure in the pci fixup function for 4xx PCI bridges by determining if the bridge is compatible with 440EPx/GRx. The flag is checked in the indirect_write_config function, and forces any writes to the PCI_CACHE_LINE_SIZE register to be zero, which will disable MRMs for these chips. A similar workaround has been tested by AMCC on various PCI cards, such as the Silicon Image ATA card and Intel E1000 GIGE card. Hangs were seen with the Silicon Image card, and MRMs were seen on the bus with a PCI analyzer. With the workaround in place, the card functioned properly and only Memory Reads were seen on the bus with the analyzer. Signed-off-by: Josh Boyer <[EMAIL PROTECTED]> --- arch/powerpc/sysdev/indirect_pci.c |6 ++ arch/powerpc/sysdev/ppc4xx_pci.c |5 + include/asm-powerpc/pci-bridge.h |3 +++ 3 files changed, 14 insertions(+) --- linux-2.6.orig/arch/powerpc/sysdev/indirect_pci.c +++ linux-2.6/arch/powerpc/sysdev/indirect_pci.c @@ -123,6 +123,12 @@ indirect_write_config(struct pci_bus *bu (bus->number == hose->first_busno)) val &= 0xff00; + /* Workaround for PCI_28 Errata in 440EPx/GRx */ + if ((hose->indirect_type & PPC_INDIRECT_TYPE_BROKEN_MRM) && + offset == PCI_CACHE_LINE_SIZE) { + val = 0; + } + /* * Note: the caller has already checked that offset is * suitably aligned and that len is 1, 2 or 4. --- linux-2.6.orig/arch/powerpc/sysdev/ppc4xx_pci.c +++ linux-2.6/arch/powerpc/sysdev/ppc4xx_pci.c @@ -75,6 +75,11 @@ static void fixup_ppc4xx_pci_bridge(stru !of_device_is_compatible(hose->dn, "ibm,plb-pci")) return; + if (of_device_is_compatible(hose->dn, "ibm,plb440epx-pci") || + of_device_is_compatible(hose->dn, "ibm,plb440grx-pci")) { + hose->indirect_type |= PPC_INDIRECT_TYPE_BROKEN_MRM; + } + /* Hide the PCI host BARs from the kernel as their content doesn't * fit well in the resource management */ --- linux-2.6.orig/include/asm-powerpc/pci-bridge.h +++ linux-2.6/include/asm-powerpc/pci-bridge.h @@ -92,12 +92,15 @@ struct pci_controller { * anything but the PHB. Only allow talking to the PHB if this is * set. * BIG_ENDIAN - cfg_addr is a big endian register +* BROKEN_MRM - the 440EPx/GRx chips have an errata that causes hangs on +* the PLB4. Effectively disable MRM commands by setting this. */ #define PPC_INDIRECT_TYPE_SET_CFG_TYPE 0x0001 #define PPC_INDIRECT_TYPE_EXT_REG 0x0002 #define PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS 0x0004 #define PPC_INDIRECT_TYPE_NO_PCIE_LINK 0x0008 #define PPC_INDIRECT_TYPE_BIG_ENDIAN 0x0010 +#define PPC_INDIRECT_TYPE_BROKEN_MRM 0x0020 u32 indirect_type; #endif /* !CONFIG_PPC64 */ /* Currently, we limit ourselves to 1 IO range ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: MMIO and gcc re-ordering issue
On Wed, 11 Jun 2008, Nick Piggin wrote: > > I can't actually find the definitive statement in the Intel manuals > saying UC is strongly ordered also WRT WB. Linus? Definitive? Dunno. But look in the Architecture manual, volume 3A, 10.3 "Methods of Caching Available", and then under the bullet about Write Combining (WC), it says the writes may be delayed until the next occurrence of a serializing event; such as, an SFENCE of MFENCE instruction, CPUID execution, a read or write to uncached memory, an interrupt occurrence, or a LOCK instruction execution. However, it's worth noting that - documentation can be wrong, or even if right, can be Intel-specific. - the above is expressly _only_ about the WC buffer, not about regular memory writes. Cached memory accesses are different from WC accesses. so in the end, the thing that matters is how things actually work. Linus ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [RFC] Kprobes for book-e
On Jun 11, 2008, at 9:18 AM, Sulibhavi, Madhvesh wrote: Hi Kumar, I could switch to different version of binutils and boot the recent git for ebony target. The kprobes booke patches attached below got applied and i didnot see any issues. These patches can be now pushed to main line? there's a bit more cleanup, but I don't see any reason we cant get this done quickly. Below is the revised patch set after addressing some cleanups in traps.c and bug fixes to kprobes.c discussed earlier. Also added the support to Documentation/kprobes.txt and KRETPROBES check in powerpc/Kconfig file. See my comments below. -Madhvesh - arch/powerpc/kernel/kprobes.c | 35 ++ + arch/powerpc/kernel/misc_32.S |2 +- arch/powerpc/kernel/traps.c | 26 +- 3 files changed, 57 insertions(+), 6 deletions(-) Your patch got line wrapped by your mailer. Take a look at Documentation/email-clients.tx static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) { +#ifdef CONFIG_BOOKE + regs->msr &= ~(MSR_EE); /* Turn off 'Externel Interrupt' bits */ + regs->msr &= ~(MSR_CE); /* Turn off 'Critical Interrupt' bits */ + regs->msr |= MSR_DE; can we remove MSR_EE and MSR_CE here? + mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) | DBCR0_IC | DBCR0_IDM); +#else regs->msr |= MSR_SE; +#endif /* * On powerpc we should single step on the original @@ -158,7 +181,7 @@ static int __kprobes kprobe_handler(stru kprobe_opcode_t insn = *p->ainsn.insn; if (kcb->kprobe_status == KPROBE_HIT_SS && is_trap(insn)) { - regs->msr &= ~MSR_SE; + regs->msr &= ~MSR_SINGLESTEP; /* Turn off 'trace' bits */ regs->msr |= kcb->kprobe_saved_msr; goto no_kprobe; } @@ -398,7 +421,7 @@ out: * will have SE set, in which case, continue the remaining processing * of do_debug, as if this is not a probe hit. */ - if (regs->msr & MSR_SE) + if (single_stepping(regs)) return 0; return 1; @@ -421,7 +444,7 @@ int __kprobes kprobe_fault_handler(struc * normal page fault. */ regs->nip = (unsigned long)cur->addr; - regs->msr &= ~MSR_SE; + regs->msr &= ~MSR_SINGLESTEP; /* Turn off 'trace' bits */ regs->msr |= kcb->kprobe_saved_msr; if (kcb->kprobe_status == KPROBE_REENTER) restore_previous_kprobe(kcb); Index: b/arch/powerpc/kernel/misc_32.S === --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S @@ -489,7 +489,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_UNIFIED_ID * * flush_icache_range(unsigned long start, unsigned long stop) */ -_GLOBAL(__flush_icache_range) +_KPROBE(__flush_icache_range) BEGIN_FTR_SECTION blr /* for 601, do nothing */ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE) Index: b/arch/powerpc/kernel/traps.c === --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -1030,7 +1030,7 @@ void SoftwareEmulation(struct pt_regs *r #if defined(CONFIG_40x) || defined(CONFIG_BOOKE) -void DebugException(struct pt_regs *regs, unsigned long debug_status) +void __kprobes DebugException(struct pt_regs *regs, unsigned long debug_status) { if (debug_status & DBSR_IC) { /* instruction completion */ regs->msr &= ~MSR_DE; @@ -1041,6 +1041,12 @@ void DebugException(struct pt_regs *regs mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) & ~DBCR0_IC); /* Clear the instruction completion event */ mtspr(SPRN_DBSR, DBSR_IC); +#ifdef CONFIG_KPROBES + if (notify_die(DIE_SSTEP, "single_step", regs, 5, + 5, SIGTRAP) == NOTIFY_STOP) { + return; + } +#endif if (debugger_sstep(regs)) return; } Index: b/Documentation/kprobes.txt === --- a/Documentation/kprobes.txt +++ b/Documentation/kprobes.txt @@ -172,6 +172,7 @@ architectures: - ia64 (Does not support probes on instruction slot1.) - sparc64 (Return probes not yet implemented.) - arm +- ppc32 3. Configuring Kprobes Index: b/arch/powerpc/Kconfig === --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -108,7 +108,7 @@ config PPC sele
Re: [v4] Fix definitions for dbcr0, dbcr1, & dbcr2 register for bookE processors
On Jun 6, 2008, at 2:09 PM, Jerone Young wrote: Updates: Placed everything in one conditional. Updated commit message. This takes values from the PowerPC ISA BookIII-E specifications that are for DBCR0. Many of these values are different from those currently specified, which are for the ppc405. Also added some bookE definitions for DBCR1 & DBCR2. Signed-off-by: Jerone Young <[EMAIL PROTECTED]> Acked-by: Kumar Gala <[EMAIL PROTECTED]> - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [v4] Fix definitions for dbcr0, dbcr1, & dbcr2 register for bookE processors
On Jun 6, 2008, at 2:09 PM, Jerone Young wrote: Updates: Placed everything in one conditional. Updated commit message. This takes values from the PowerPC ISA BookIII-E specifications that are for DBCR0. Many of these values are different from those currently specified, which are for the ppc405. Also added some bookE definitions for DBCR1 & DBCR2. Signed-off-by: Jerone Young <[EMAIL PROTECTED]> applied to powerpc-next. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [RFC:PATCH 02/06] mm: Allow architectures to define additional protection bits
On Tue, 2008-06-10 at 15:14 -0700, Andrew Morton wrote: > On Tue, 10 Jun 2008 18:01:07 -0400 > Dave Kleikamp <[EMAIL PROTECTED]> wrote: > > > mm: Allow architectures to define additional protection bits > > > > This patch allows architectures to define functions to deal with > > additional protections bits for mmap() and mprotect(). > > > > arch_calc_vm_prot_bits() maps additonal protection bits to vm_flags > > arch_vm_get_page_prot() maps additional vm_flags to the vma's vm_page_prot > > arch_validate_prot() checks for valid values of the protection bits > > > > Note: vm_get_page_prot() is now pretty ugly. Suggestions? > > It didn't get any better, no ;) > > I wonder if we can do the ORing after doing the protection_map[] > lookup. I guess that's illogical even if it happens to work. I guess we can live with it. Just holding out hope that someone might see a nicer way to do it. > > diff -Nurp linux001/include/linux/mman.h linux002/include/linux/mman.h > > --- linux001/include/linux/mman.h 2008-06-05 10:08:01.0 -0500 > > +++ linux002/include/linux/mman.h 2008-06-10 16:48:59.0 -0500 > > @@ -34,6 +34,26 @@ static inline void vm_unacct_memory(long > > } > > > > /* > > + * Allow architectures to handle additional protection bits > > + */ > > + > > +#ifndef HAVE_ARCH_PROT_BITS > > +#define arch_calc_vm_prot_bits(prot) 0 > > +#define arch_vm_get_page_prot(vm_flags) __pgprot(0) > > + > > +/* > > + * This is called from mprotect(). PROT_GROWSDOWN and PROT_GROWSUP have > > + * already been masked out. > > + * > > + * Returns true if the prot flags are valid > > + */ > > +static inline int arch_validate_prot(unsigned long prot) > > +{ > > + return (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM)) == 0; > > +} > > +#endif /* HAVE_ARCH_PROT_BITS */ > > argh, another HAVE_ARCH_foo. Sorry. I didn't realize HAVE_ARCH_foo was so evil. > A good (but verbose) way of doing this is to nuke the ifdefs and just > go and define these three things for each architecture. That can be > done via copy-n-paste into include/asm-*/mman.h or #include > (?) within each asm/mman.h. > > Another way would be > > #ifndef arch_calc_vm_prot_bits > #define arch_calc_vm_prot_bits(prot) ... I think I prefer this method. I'll get rid of HAVE_ARCH_PROT_BITS. Thanks, Shaggy -- David Kleikamp IBM Linux Technology Center ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [RFC] Kprobes for book-e
--- Here's a cleaned up version of my patch incorporating the changes we've discussed and some minor tweaks to traps.c. Can you take a look and test it out. I'm wondering about having to clear MSR_EE & MSR_CE in prepare_singlestep(). Doesnt seem like we need to do that at all. - k Documentation/kprobes.txt |1 + arch/powerpc/kernel/kprobes.c | 23 +++ arch/powerpc/kernel/misc_32.S |2 +- arch/powerpc/kernel/traps.c | 32 +--- include/asm-powerpc/system.h |9 + 5 files changed, 47 insertions(+), 20 deletions(-) diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt index 6877e71..a79633d 100644 --- a/Documentation/kprobes.txt +++ b/Documentation/kprobes.txt @@ -172,6 +172,7 @@ architectures: - ia64 (Does not support probes on instruction slot1.) - sparc64 (Return probes not yet implemented.) - arm +- ppc 3. Configuring Kprobes diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index 23545a2..0dca55e 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c @@ -34,6 +34,13 @@ #include #include #include +#include + +#ifdef CONFIG_BOOKE +#define MSR_SINGLESTEP (MSR_DE) +#else +#define MSR_SINGLESTEP (MSR_SE) +#endif DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); @@ -53,7 +60,8 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p) ret = -EINVAL; } - /* insn must be on a special executable page on ppc64 */ + /* insn must be on a special executable page on ppc64. This is +* not explicitly required on ppc32 (right now), but it doesn't hurt */ if (!ret) { p->ainsn.insn = get_insn_slot(); if (!p->ainsn.insn) @@ -95,7 +103,14 @@ void __kprobes arch_remove_kprobe(struct kprobe *p) static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) { +#ifdef CONFIG_BOOKE + regs->msr &= ~(MSR_EE); /* Turn off 'Externel Interrupt' bits */ + regs->msr &= ~(MSR_CE); /* Turn off 'Critical Interrupt' bits */ + regs->msr |= MSR_DE; + mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) | DBCR0_IC | DBCR0_IDM); +#else regs->msr |= MSR_SE; +#endif /* * On powerpc we should single step on the original @@ -158,7 +173,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs) kprobe_opcode_t insn = *p->ainsn.insn; if (kcb->kprobe_status == KPROBE_HIT_SS && is_trap(insn)) { - regs->msr &= ~MSR_SE; + regs->msr &= ~MSR_SINGLESTEP; /* Turn off 'trace' bits */ regs->msr |= kcb->kprobe_saved_msr; goto no_kprobe; } @@ -398,7 +413,7 @@ out: * will have SE set, in which case, continue the remaining processing * of do_debug, as if this is not a probe hit. */ - if (regs->msr & MSR_SE) + if (single_stepping(regs)) return 0; return 1; @@ -421,7 +436,7 @@ int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr) * normal page fault. */ regs->nip = (unsigned long)cur->addr; - regs->msr &= ~MSR_SE; + regs->msr &= ~MSR_SINGLESTEP; /* Turn off 'trace' bits */ regs->msr |= kcb->kprobe_saved_msr; if (kcb->kprobe_status == KPROBE_REENTER) restore_previous_kprobe(kcb); diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 896..6321ae3 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S @@ -489,7 +489,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_UNIFIED_ID_CACHE) * * flush_icache_range(unsigned long start, unsigned long stop) */ -_GLOBAL(__flush_icache_range) +_KPROBE(__flush_icache_range) BEGIN_FTR_SECTION blr /* for 601, do nothing */ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 4b5b7ff..985bff5 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -316,10 +316,6 @@ static inline int check_io_access(struct pt_regs *regs) #define REASON_PRIVILEGED ESR_PPR #define REASON_TRAPESR_PTR -/* single-step stuff */ -#define single_stepping(regs) (current->thread.dbcr0 & DBCR0_IC) -#define clear_single_step(regs)(current->thread.dbcr0 &= ~DBCR0_IC) - #else /* On non-4xx, the reason for the machine check or program exception is in the MSR. */ @@ -330,8 +326,6 @@ static inline int check_io_access(struct pt_regs *regs) #define REASON_PRIVILEGED 0x4 #define REASON_TRAP0x2 -#define single_stepping(regs) ((regs)->msr &
Re: [i2c] [PATCH] Convert i2c-mpc from a platform driver to an of_platform one
On Tue, Jun 10, 2008 at 10:40:45PM -0400, Jon Smirl wrote: > Convert i2c-mpc from a platform driver into an of_platform driver. > This patch is much smaller since Jochen already added > of_find_i2c_driver(). Versions of this have been posted before. > > Signed-ff-by: Jon Smirl <[EMAIL PROTECTED]> Typo: Signed-off... (I'm curious, do such typos enforce resending the patch?) Tested-by: Wolfram Sang <[EMAIL PROTECTED]> > > -- > > drivers/i2c/busses/i2c-mpc.c | 105 > +- > 1 files changed, 63 insertions(+), 42 deletions(-) > > > diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c > index a076129..76d8091 100644 > --- a/drivers/i2c/busses/i2c-mpc.c > +++ b/drivers/i2c/busses/i2c-mpc.c > @@ -18,6 +18,8 @@ > #include > #include > #include > +#include > +#include > > #include > #include > @@ -25,13 +27,13 @@ > #include > #include > > -#define MPC_I2C_ADDR 0x00 > +#define DRV_NAME "mpc-i2c" > + > #define MPC_I2C_FDR 0x04 > #define MPC_I2C_CR 0x08 > #define MPC_I2C_SR 0x0c > #define MPC_I2C_DR 0x10 > #define MPC_I2C_DFSRR 0x14 > -#define MPC_I2C_REGION 0x20 > > #define CCR_MEN 0x80 > #define CCR_MIEN 0x40 > @@ -315,102 +317,121 @@ static struct i2c_adapter mpc_ops = { > .timeout = 1, > }; > > -static int fsl_i2c_probe(struct platform_device *pdev) > +static int fsl_i2c_probe(struct of_device *op, const struct > of_device_id *match) The above two lines have to be concatenated, otherwise the patch will not apply. Also, __devinit? > { > int result = 0; > struct mpc_i2c *i2c; > - struct fsl_i2c_platform_data *pdata; > - struct resource *r = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - > - pdata = (struct fsl_i2c_platform_data *) pdev->dev.platform_data; > > i2c = kzalloc(sizeof(*i2c), GFP_KERNEL); > if (!i2c) > return -ENOMEM; > > - i2c->irq = platform_get_irq(pdev, 0); > - if (i2c->irq < 0) > - i2c->irq = NO_IRQ; /* Use polling */ > + if (of_get_property(op->node, "dfsrr", NULL)) > + i2c->flags |= FSL_I2C_DEV_SEPARATE_DFSRR; > > - i2c->flags = pdata->device_flags; > - init_waitqueue_head(&i2c->queue); > + if (of_device_is_compatible(op->node, "mpc5200-i2c")) > + i2c->flags |= FSL_I2C_DEV_CLOCK_5200; > > - i2c->base = ioremap((phys_addr_t)r->start, MPC_I2C_REGION); > + init_waitqueue_head(&i2c->queue); > > + i2c->base = of_iomap(op->node, 0); > if (!i2c->base) { > printk(KERN_ERR "i2c-mpc - failed to map controller\n"); > result = -ENOMEM; > goto fail_map; > } > > - if (i2c->irq != NO_IRQ) > - if ((result = request_irq(i2c->irq, mpc_i2c_isr, > - IRQF_SHARED, "i2c-mpc", i2c)) < 0) { > - printk(KERN_ERR > -"i2c-mpc - failed to attach interrupt\n"); > - goto fail_irq; > - } > + i2c->irq = irq_of_parse_and_map(op->node, 0); > + if (i2c->irq == NO_IRQ) { > + result = -ENXIO; Minor thing, but I wonder if -EINVAL is more appropriate? > + goto fail_irq; > + } > + > + result = request_irq(i2c->irq, mpc_i2c_isr, > + IRQF_SHARED, "i2c-mpc", i2c); > + if (result < 0) { > + printk(KERN_ERR "i2c-mpc - failed to attach interrupt\n"); > + goto fail_request; > + } > > mpc_i2c_setclock(i2c); > - platform_set_drvdata(pdev, i2c); > + > + dev_set_drvdata(&op->dev, i2c); > > i2c->adap = mpc_ops; > - i2c->adap.nr = pdev->id; > i2c_set_adapdata(&i2c->adap, i2c); > - i2c->adap.dev.parent = &pdev->dev; > - if ((result = i2c_add_numbered_adapter(&i2c->adap)) < 0) { > + i2c->adap.dev.parent = &op->dev; > + > + result = i2c_add_adapter(&i2c->adap); > + if (result < 0) { > printk(KERN_ERR "i2c-mpc - failed to add adapter\n"); > goto fail_add; > } > + of_register_i2c_devices(&i2c->adap, op->node); > > return result; > > - fail_add: > - if (i2c->irq != NO_IRQ) > - free_irq(i2c->irq, i2c); > - fail_irq: > + fail_add: > + dev_set_drvdata(&op->dev, NULL); > + free_irq(i2c->irq, i2c); > + fail_request: > + irq_dispose_mapping(i2c->irq); > + fail_irq: > iounmap(i2c->base); > - fail_map: > + fail_map: > kfree(i2c); > return result; > }; > > -static int fsl_i2c_remove(struct platform_device *pdev) > +static int fsl_i2c_remove(struct of_device *op) __devexit? > { > - struct mpc_i2c *i2c = platform_get_drvdata(pdev); > + struct mpc_i2c *i2c = dev_get_drvdata(&op->dev); > > i2c_del_adapter(&i2c->adap); > - platform_set_drvdata(pdev, NULL); > + dev_set_drvdata(&op->dev, NULL); > > if (i2c->irq != NO_IRQ) > fr
Re: how to check for "optional" ppc chip features (MSR_BE)
On May 13, 2008, at 2:33 PM, Roland McGrath wrote: So it looks like we need to define a new feature bit to mean "supports block-step". Is this something that userspace will expect to be told about via the AT_HWCAP entry in the aux vector? I don't care to have userland know about it. I'm just concerned with the arch_has_block_step() definition being right. But, you did previously tell me that userland can set its own MSR_SE via sigreturn or setcontext or something. If it can set its own MSR_BE the same way, then perhaps userland wants to know. Did we close on this, I'm going to test Roland's patch on book-e and will post results. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: MMIO and gcc re-ordering issue
On Tuesday, June 10, 2008 8:29 pm Nick Piggin wrote: > On Wednesday 11 June 2008 05:19, Jesse Barnes wrote: > > On Tuesday, June 10, 2008 12:05 pm Roland Dreier wrote: > > > > me too. That's the whole basis for readX_relaxed() and its cohorts: > > > > we make our weirdest machines (like altix) conform to the x86 norm. > > > > Then where it really kills us we introduce additional semantics to > > > > selected drivers that enable us to recover I/O speed on the abnormal > > > > platforms. > > > > > > Except as I pointed out before, Altix doesn't conform to the norm and > > > many (most?) drivers are missing mmiowb()s that are needed for Altix. > > > Just no one has plugged most devices into an Altix (or haven't stressed > > > the driver in a way that exposes problems of IO ordering between CPUs). > > > > > > It would be a great thing to use the powerpc trick of setting a flag > > > that is tested by spin_unlock()/mutex_unlock() and automatically doing > > > the mmiowb() if needed, and then killing off mmiowb() entirely. > > > > Yeah I think that's what Nick's guidelines would guarantee. And Jes is > > already working on the spin_unlock change you mentioned, so mmiowb() > > should be history soon (in name only, assuming Nick also introduces the > > I/O barriers he talked about for ordering the looser accessors it would > > still be there but would be called io_wmb or something). > > Exactly, yes. I guess everybody has had good intentions here, but > as noticed, what is lacking is coordination and documentation. > > You mention strong ordering WRT spin_unlock, which suggests that > you would prefer to take option #2 (the current powerpc one): io/io > is ordered and io is contained inside spinlocks, but io/cacheable > in general is not ordered. I was thinking it would be good for the weaker accessors, but now that I think about it you could just use the new io_* barrier functions. I didn't mean to imply that I wasn't in favor of the io/cacheable ordering as well. > For any high performance drivers that are well maintained (ie. the > ones where slowdown might be noticed), everyone should have a pretty > good handle on memory ordering requirements, so it shouldn't take > long to go through and convert them to relaxed accessors. Yep. Thanks for working on this, Nick, it's definitely a good thing that you're taking control of it. :) Thanks, Jesse ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc/QE: qe_reset should be __init
On Jun 11, 2008, at 7:32 AM, Anton Vorontsov wrote: This patch fixes following section mismatch: WARNING: arch/powerpc/sysdev/built-in.o(.text+0x11d8): Section mismatch in reference from the function qe_reset() to the function .init.text:cpm_muram_init() Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- arch/powerpc/sysdev/qe_lib/qe.c |2 +- include/asm-powerpc/qe.h|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) applied. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [i2c] [PATCH] Convert i2c-mpc from a platform driver to an of_platform one
On 6/11/08, Wolfram Sang <[EMAIL PROTECTED]> wrote: > On Tue, Jun 10, 2008 at 10:40:45PM -0400, Jon Smirl wrote: > > Convert i2c-mpc from a platform driver into an of_platform driver. > > This patch is much smaller since Jochen already added > > of_find_i2c_driver(). Versions of this have been posted before. > > > > Signed-ff-by: Jon Smirl <[EMAIL PROTECTED]> > > > Typo: Signed-off... (I'm curious, do such typos enforce resending the > patch?) I just cut and pasted this version to get the comments. Next pass I will send it using stgit which will add the right signed-off line and fix the wrapping. > > Tested-by: Wolfram Sang <[EMAIL PROTECTED]> > > > > > > -- > > > > drivers/i2c/busses/i2c-mpc.c | 105 > +- > > 1 files changed, 63 insertions(+), 42 deletions(-) > > > > > > diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c > > index a076129..76d8091 100644 > > --- a/drivers/i2c/busses/i2c-mpc.c > > +++ b/drivers/i2c/busses/i2c-mpc.c > > @@ -18,6 +18,8 @@ > > #include > > #include > > #include > > +#include > > +#include > > > > #include > > #include > > @@ -25,13 +27,13 @@ > > #include > > #include > > > > -#define MPC_I2C_ADDR 0x00 > > +#define DRV_NAME "mpc-i2c" > > + > > #define MPC_I2C_FDR 0x04 > > #define MPC_I2C_CR 0x08 > > #define MPC_I2C_SR 0x0c > > #define MPC_I2C_DR 0x10 > > #define MPC_I2C_DFSRR 0x14 > > -#define MPC_I2C_REGION 0x20 > > > > #define CCR_MEN 0x80 > > #define CCR_MIEN 0x40 > > @@ -315,102 +317,121 @@ static struct i2c_adapter mpc_ops = { > > .timeout = 1, > > }; > > > > -static int fsl_i2c_probe(struct platform_device *pdev) > > +static int fsl_i2c_probe(struct of_device *op, const struct > > of_device_id *match) > > > The above two lines have to be concatenated, otherwise the patch will > not apply. Also, __devinit? > > > > { > > int result = 0; > > struct mpc_i2c *i2c; > > - struct fsl_i2c_platform_data *pdata; > > - struct resource *r = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > - > > - pdata = (struct fsl_i2c_platform_data *) pdev->dev.platform_data; > > > > i2c = kzalloc(sizeof(*i2c), GFP_KERNEL); > > if (!i2c) > > return -ENOMEM; > > > > - i2c->irq = platform_get_irq(pdev, 0); > > - if (i2c->irq < 0) > > - i2c->irq = NO_IRQ; /* Use polling */ > > + if (of_get_property(op->node, "dfsrr", NULL)) > > + i2c->flags |= FSL_I2C_DEV_SEPARATE_DFSRR; > > > > - i2c->flags = pdata->device_flags; > > - init_waitqueue_head(&i2c->queue); > > + if (of_device_is_compatible(op->node, "mpc5200-i2c")) > > + i2c->flags |= FSL_I2C_DEV_CLOCK_5200; > > > > - i2c->base = ioremap((phys_addr_t)r->start, MPC_I2C_REGION); > > + init_waitqueue_head(&i2c->queue); > > > > + i2c->base = of_iomap(op->node, 0); > > if (!i2c->base) { > > printk(KERN_ERR "i2c-mpc - failed to map controller\n"); > > result = -ENOMEM; > > goto fail_map; > > } > > > > - if (i2c->irq != NO_IRQ) > > - if ((result = request_irq(i2c->irq, mpc_i2c_isr, > > - IRQF_SHARED, "i2c-mpc", i2c)) < 0) > { > > - printk(KERN_ERR > > -"i2c-mpc - failed to attach interrupt\n"); > > - goto fail_irq; > > - } > > + i2c->irq = irq_of_parse_and_map(op->node, 0); > > + if (i2c->irq == NO_IRQ) { > > + result = -ENXIO; > > > Minor thing, but I wonder if -EINVAL is more appropriate? > > > > + goto fail_irq; > > + } > > + > > + result = request_irq(i2c->irq, mpc_i2c_isr, > > + IRQF_SHARED, "i2c-mpc", i2c); > > + if (result < 0) { > > + printk(KERN_ERR "i2c-mpc - failed to attach interrupt\n"); > > + goto fail_request; > > + } > > > > mpc_i2c_setclock(i2c); > > - platform_set_drvdata(pdev, i2c); > > + > > + dev_set_drvdata(&op->dev, i2c); > > > > i2c->adap = mpc_ops; > > - i2c->adap.nr = pdev->id; > > i2c_set_adapdata(&i2c->adap, i2c); > > - i2c->adap.dev.parent = &pdev->dev; > > - if ((result = i2c_add_numbered_adapter(&i2c->adap)) < 0) { > > + i2c->adap.dev.parent = &op->dev; > > + > > + result = i2c_add_adapter(&i2c->adap); > > + if (result < 0) { > > printk(KERN_ERR "i2c-mpc - failed to add adapter\n"); > > goto fail_add; > > } > > + of_register_i2c_devices(&i2c->adap, op->node); > > > > return result; > > > > - fail_add: > > - if (i2c->irq != NO_IRQ) > > - free_irq(i2c->irq, i2c); > > - fail_irq: > > + fail_add: > > + dev_set_drvdata(&op->dev, NULL); > > + free_irq(i
[PATCH] powerpc/cell: disable ptcal in case of kdump reboot
The ibm,cbe-start-ptcal rtas call transfers ownership of a memory range to the hardware in order to do periodic memory interface recalibration. When we do a kexec, we need to get this page back, so we don't step on the new kernel's toes. We used to do this correctly in case of a user triggered kexec, but not for kdump. This patch disables ptcal from the cell specific machine_crash_shutdown() callback. I also needed to fix the pseries code that tries to install its default_machine_crash_shutdown() code independent of what machine we're running on. The fix has been verified by Akira Tsukamoto, the original reporter of the problem. Acked-by: Akira Tsukamoto <[EMAIL PROTECTED]> Signed-off-by: Arnd Bergmann <[EMAIL PROTECTED]> --- arch/powerpc/platforms/cell/ras.c |6 ++ arch/powerpc/platforms/cell/ras.h |1 + arch/powerpc/platforms/cell/setup.c|2 +- arch/powerpc/platforms/pseries/kexec.c |2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c index 655704a..21b313d 100644 --- a/arch/powerpc/platforms/cell/ras.c +++ b/arch/powerpc/platforms/cell/ras.c @@ -226,6 +226,12 @@ static int cbe_ptcal_notify_reboot(struct notifier_block *nb, return cbe_ptcal_disable(); } +void cbe_machine_crash_shutdown(struct pt_regs *regs) +{ + cbe_ptcal_disable(); + return default_machine_crash_shutdown(regs); +} + static struct notifier_block cbe_ptcal_reboot_notifier = { .notifier_call = cbe_ptcal_notify_reboot }; diff --git a/arch/powerpc/platforms/cell/ras.h b/arch/powerpc/platforms/cell/ras.h index eb7ee54..d1401f9 100644 --- a/arch/powerpc/platforms/cell/ras.h +++ b/arch/powerpc/platforms/cell/ras.h @@ -5,5 +5,6 @@ extern void cbe_system_error_exception(struct pt_regs *regs); extern void cbe_maintenance_exception(struct pt_regs *regs); extern void cbe_thermal_exception(struct pt_regs *regs); extern void cbe_ras_init(void); +extern void cbe_machine_crash_shutdown(struct pt_regs *regs); #endif /* RAS_H */ diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c index ab721b5..b555030 100644 --- a/arch/powerpc/platforms/cell/setup.c +++ b/arch/powerpc/platforms/cell/setup.c @@ -292,6 +292,6 @@ define_machine(cell) { #ifdef CONFIG_KEXEC .machine_kexec = default_machine_kexec, .machine_kexec_prepare = default_machine_kexec_prepare, - .machine_crash_shutdown = default_machine_crash_shutdown, + .machine_crash_shutdown = cbe_machine_crash_shutdown, #endif }; diff --git a/arch/powerpc/platforms/pseries/kexec.c b/arch/powerpc/platforms/pseries/kexec.c index e9dd5fe..53cbd53 100644 --- a/arch/powerpc/platforms/pseries/kexec.c +++ b/arch/powerpc/platforms/pseries/kexec.c @@ -70,4 +70,4 @@ static int __init pseries_kexec_setup(void) return 0; } -__initcall(pseries_kexec_setup); +machine_device_initcall(pseries, pseries_kexec_setup); -- 1.5.4.3 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
please pull merge branch of cell-2.6.git
Hi Paul, Please pull the fix I just sent from master.kernel.org/pub/scm/linux/kernel/git/arnd/cell-2.6.git merge Jeremy might want to look at it as well, since he wrote the code originally. Thanks, Arnd <>< --- Arnd Bergmann <[EMAIL PROTECTED]>: powerpc/cell: disable ptcal in case of kdump reboot arch/powerpc/platforms/cell/ras.c |6 ++ arch/powerpc/platforms/cell/ras.h |1 + arch/powerpc/platforms/cell/setup.c|2 +- arch/powerpc/platforms/pseries/kexec.c |2 +- 4 files changed, 9 insertions(+), 2 deletions(-) ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [Cbe-oss-dev] [PATCH] powerpc/cell: disable ptcal in case of kdump reboot
On Wed, 2008-06-11 at 18:28 +0200, Arnd Bergmann wrote: > The ibm,cbe-start-ptcal rtas call transfers ownership > of a memory range to the hardware in order to do > periodic memory interface recalibration. > When we do a kexec, we need to get this page back, > so we don't step on the new kernel's toes. > We used to do this correctly in case of a user triggered > kexec, but not for kdump. Used to? > This patch disables ptcal from the cell specific > machine_crash_shutdown() callback. I'd rather you used the crash_shutdown_register() infrastructure Mikey added for EHEA - it's designed for just this sort of thing. > I also needed to fix the pseries code that tries to install its > default_machine_crash_shutdown() code independent > of what machine we're running on. That's a buglet. 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 signature.asc Description: This is a digitally signed message part ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: Image generation for Efika is broken in 2.6.26
On Wed, Jun 11, 2008 at 03:28:43PM +0200, Marc Kleine-Budde wrote: > Scott Wood wrote: > > Are you using binutils 2.17? It has a bug that was triggered by the > > p_paddr change. Do you get a bunch of warnings from the strip command? > > Same problem here with binutils-2.17. But no warnings from strip. Can > you give me some pointers to the original bug report or the fix of the > problem in the binutils svn. I've searched this mailinglist and the > binutils bugzilla, but without success. Not sure, I just know that I don't see the behavior on anything before or after 2.17. This is the closest I found, though it's post-2.18: http://www.nabble.com/Zero-p_paddr-confuses-BFD-td17002340.html -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] powerpc/booke: Fix definitions for dbcr[1-2] and dbsr registers
From: Jerone Young <[EMAIL PROTECTED]> This takes values from the PowerPC ISA BookIII-E specifications that are for DBCR0. Many of these values are different from those currently specified, which are for the ppc405. Also added some bookE definitions for DBCR1 & DBCR2. [ [EMAIL PROTECTED]: Added aliases to 40x DBCR0 to match Book-E, Added enhanced debug DBCR0/DBSR _CIRPT and _CRET defines and DBSR IRPT and RET. ] Signed-off-by: Jerone Young <[EMAIL PROTECTED]> Acked-by: Josh Boyer <[EMAIL PROTECTED]> Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> --- Jerone, take a look at this one. Its in the powerpc-next branch of my git tree. Note I've dropped some of the aliases you added and the reason is to match the existing DBSR bits. - k include/asm-powerpc/reg_booke.h | 53 +++ 1 files changed, 53 insertions(+), 0 deletions(-) diff --git a/include/asm-powerpc/reg_booke.h b/include/asm-powerpc/reg_booke.h index cf54a3f..8223254 100644 --- a/include/asm-powerpc/reg_booke.h +++ b/include/asm-powerpc/reg_booke.h @@ -210,6 +210,7 @@ #ifdef CONFIG_BOOKE #define DBSR_IC0x0800 /* Instruction Completion */ #define DBSR_BT0x0400 /* Branch Taken */ +#define DBSR_IRPT 0x0200 /* Exception Debug Event */ #define DBSR_TIE 0x0100 /* Trap Instruction Event */ #define DBSR_IAC1 0x0080 /* Instr Address Compare 1 Event */ #define DBSR_IAC2 0x0040 /* Instr Address Compare 2 Event */ @@ -219,10 +220,14 @@ #define DBSR_DAC1W 0x0004 /* Data Addr Compare 1 Write Event */ #define DBSR_DAC2R 0x0002 /* Data Addr Compare 2 Read Event */ #define DBSR_DAC2W 0x0001 /* Data Addr Compare 2 Write Event */ +#define DBSR_RET 0x8000 /* Return Debug Event */ +#define DBSR_CIRPT 0x0040 /* Critical Interrupt Taken Event */ +#define DBSR_CRET 0x0020 /* Critical Return Debug Event */ #endif #ifdef CONFIG_40x #define DBSR_IC0x8000 /* Instruction Completion */ #define DBSR_BT0x4000 /* Branch taken */ +#define DBSR_IRPT 0x2000 /* Exception Debug Event */ #define DBSR_TIE 0x1000 /* Trap Instruction debug Event */ #define DBSR_IAC1 0x0400 /* Instruction Address Compare 1 Event */ #define DBSR_IAC2 0x0200 /* Instruction Address Compare 2 Event */ @@ -253,6 +258,7 @@ #define ESR_BO 0x0002 /* Byte Ordering */ /* Bit definitions related to the DBCR0. */ +#if defined(CONFIG_40x) #define DBCR0_EDM 0x8000 /* External Debug Mode */ #define DBCR0_IDM 0x4000 /* Internal Debug Mode */ #define DBCR0_RST 0x3000 /* all the bits in the RST field */ @@ -261,20 +267,67 @@ #define DBCR0_RST_CORE 0x1000 /* Core Reset */ #define DBCR0_RST_NONE 0x /* No Reset */ #define DBCR0_IC 0x0800 /* Instruction Completion */ +#define DBCR0_ICMP DBCR0_IC #define DBCR0_BT 0x0400 /* Branch Taken */ +#define DBCR0_BRT DBCR0_BT #define DBCR0_EDE 0x0200 /* Exception Debug Event */ +#define DBCR0_IRPT DBCR0_EDE #define DBCR0_TDE 0x0100 /* TRAP Debug Event */ #define DBCR0_IA1 0x0080 /* Instr Addr compare 1 enable */ +#define DBCR0_IAC1 DBCR0_IA1 #define DBCR0_IA2 0x0040 /* Instr Addr compare 2 enable */ +#define DBCR0_IAC2 DBCR0_IA2 #define DBCR0_IA12 0x0020 /* Instr Addr 1-2 range enable */ #define DBCR0_IA12X0x0010 /* Instr Addr 1-2 range eXclusive */ #define DBCR0_IA3 0x0008 /* Instr Addr compare 3 enable */ +#define DBCR0_IAC3 DBCR0_IA3 #define DBCR0_IA4 0x0004 /* Instr Addr compare 4 enable */ +#define DBCR0_IAC4 DBCR0_IA4 #define DBCR0_IA34 0x0002 /* Instr Addr 3-4 range Enable */ #define DBCR0_IA34X0x0001 /* Instr Addr 3-4 range eXclusive */ #define DBCR0_IA12T0x8000 /* Instr Addr 1-2 range Toggle */ #define DBCR0_IA34T0x4000 /* Instr Addr 3-4 range Toggle */ #define DBCR0_FT 0x0001 /* Freeze Timers on debug event */ +#elif defined(CONFIG_BOOKE) +#define DBCR0_EDM 0x8000 /* External Debug Mode */ +#define DBCR0_IDM 0x4000 /* Internal Debug Mode */ +#define DBCR0_RST 0x3000 /* all the bits in the RST field */ +/* DBCR0_RST_* is 44x specific and not followed in fsl booke */ +#define DBCR0_RST_SYSTEM 0x3000/* System Reset */ +#define DBCR0_RST_CHIP 0x2000 /* Chip Reset */ +#define DBCR0_RST_CORE 0x1000 /* Core Reset */ +#define DBCR0_RST_NONE 0x /* No Reset */ +#define DBCR0_ICMP 0x0800 /* Instruction Completion */ +#define DBCR0_BRT 0x0400 /* Branch Taken */ +#define DBCR0_BT DBCR0_BRT +#defi
[PATCH v2] powerpc/booke: Fix definitions for dbcr[1-2] and dbsr registers
From: Jerone Young <[EMAIL PROTECTED]> This takes values from the PowerPC ISA BookIII-E specifications that are for DBCR0. Many of these values are different from those currently specified, which are for the ppc405. Also added some bookE definitions for DBCR1 & DBCR2. [ [EMAIL PROTECTED]: Added aliases to 40x DBCR0 to match Book-E, Added enhanced debug DBCR0/DBSR _CIRPT and _CRET defines and DBSR IRPT and RET. ] Signed-off-by: Jerone Young <[EMAIL PROTECTED]> Acked-by: Josh Boyer <[EMAIL PROTECTED]> Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> --- Missed an alias for DBCR0_IC for book-e - k include/asm-powerpc/reg_booke.h | 53 +++ 1 files changed, 53 insertions(+), 0 deletions(-) diff --git a/include/asm-powerpc/reg_booke.h b/include/asm-powerpc/reg_booke.h index cf54a3f..8223254 100644 --- a/include/asm-powerpc/reg_booke.h +++ b/include/asm-powerpc/reg_booke.h @@ -210,6 +210,7 @@ #ifdef CONFIG_BOOKE #define DBSR_IC0x0800 /* Instruction Completion */ #define DBSR_BT0x0400 /* Branch Taken */ +#define DBSR_IRPT 0x0200 /* Exception Debug Event */ #define DBSR_TIE 0x0100 /* Trap Instruction Event */ #define DBSR_IAC1 0x0080 /* Instr Address Compare 1 Event */ #define DBSR_IAC2 0x0040 /* Instr Address Compare 2 Event */ @@ -219,10 +220,14 @@ #define DBSR_DAC1W 0x0004 /* Data Addr Compare 1 Write Event */ #define DBSR_DAC2R 0x0002 /* Data Addr Compare 2 Read Event */ #define DBSR_DAC2W 0x0001 /* Data Addr Compare 2 Write Event */ +#define DBSR_RET 0x8000 /* Return Debug Event */ +#define DBSR_CIRPT 0x0040 /* Critical Interrupt Taken Event */ +#define DBSR_CRET 0x0020 /* Critical Return Debug Event */ #endif #ifdef CONFIG_40x #define DBSR_IC0x8000 /* Instruction Completion */ #define DBSR_BT0x4000 /* Branch taken */ +#define DBSR_IRPT 0x2000 /* Exception Debug Event */ #define DBSR_TIE 0x1000 /* Trap Instruction debug Event */ #define DBSR_IAC1 0x0400 /* Instruction Address Compare 1 Event */ #define DBSR_IAC2 0x0200 /* Instruction Address Compare 2 Event */ @@ -253,6 +258,7 @@ #define ESR_BO 0x0002 /* Byte Ordering */ /* Bit definitions related to the DBCR0. */ +#if defined(CONFIG_40x) #define DBCR0_EDM 0x8000 /* External Debug Mode */ #define DBCR0_IDM 0x4000 /* Internal Debug Mode */ #define DBCR0_RST 0x3000 /* all the bits in the RST field */ @@ -261,20 +267,67 @@ #define DBCR0_RST_CORE 0x1000 /* Core Reset */ #define DBCR0_RST_NONE 0x /* No Reset */ #define DBCR0_IC 0x0800 /* Instruction Completion */ +#define DBCR0_ICMP DBCR0_IC #define DBCR0_BT 0x0400 /* Branch Taken */ +#define DBCR0_BRT DBCR0_BT #define DBCR0_EDE 0x0200 /* Exception Debug Event */ +#define DBCR0_IRPT DBCR0_EDE #define DBCR0_TDE 0x0100 /* TRAP Debug Event */ #define DBCR0_IA1 0x0080 /* Instr Addr compare 1 enable */ +#define DBCR0_IAC1 DBCR0_IA1 #define DBCR0_IA2 0x0040 /* Instr Addr compare 2 enable */ +#define DBCR0_IAC2 DBCR0_IA2 #define DBCR0_IA12 0x0020 /* Instr Addr 1-2 range enable */ #define DBCR0_IA12X0x0010 /* Instr Addr 1-2 range eXclusive */ #define DBCR0_IA3 0x0008 /* Instr Addr compare 3 enable */ +#define DBCR0_IAC3 DBCR0_IA3 #define DBCR0_IA4 0x0004 /* Instr Addr compare 4 enable */ +#define DBCR0_IAC4 DBCR0_IA4 #define DBCR0_IA34 0x0002 /* Instr Addr 3-4 range Enable */ #define DBCR0_IA34X0x0001 /* Instr Addr 3-4 range eXclusive */ #define DBCR0_IA12T0x8000 /* Instr Addr 1-2 range Toggle */ #define DBCR0_IA34T0x4000 /* Instr Addr 3-4 range Toggle */ #define DBCR0_FT 0x0001 /* Freeze Timers on debug event */ +#elif defined(CONFIG_BOOKE) +#define DBCR0_EDM 0x8000 /* External Debug Mode */ +#define DBCR0_IDM 0x4000 /* Internal Debug Mode */ +#define DBCR0_RST 0x3000 /* all the bits in the RST field */ +/* DBCR0_RST_* is 44x specific and not followed in fsl booke */ +#define DBCR0_RST_SYSTEM 0x3000/* System Reset */ +#define DBCR0_RST_CHIP 0x2000 /* Chip Reset */ +#define DBCR0_RST_CORE 0x1000 /* Core Reset */ +#define DBCR0_RST_NONE 0x /* No Reset */ +#define DBCR0_ICMP 0x0800 /* Instruction Completion */ +#define DBCR0_BRT 0x0400 /* Branch Taken */ +#define DBCR0_BT DBCR0_BRT +#define DBCR0_IRPT 0x0200 /* Exception Debug Event */ +#define DBCR0_TDE 0x0100 /* TRAP Debug Event */ +#define DBCR0_I
[PATCH] powerpc/booke: Fix some comments related to debug level exceptions
--- In my git tree, just posting so people see it. - k arch/powerpc/kernel/head_booke.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h index f277fad..9501c58 100644 --- a/arch/powerpc/kernel/head_booke.h +++ b/arch/powerpc/kernel/head_booke.h @@ -240,7 +240,7 @@ label: * the code where the exception occurred (since exception entry \ * doesn't turn off DE automatically). We simulate the effect\ * of turning off DE on entry to an exception handler by turning \ -* off DE in the CSRR1 value and clearing the debug status. \ +* off DE in the DSRR1 value and clearing the debug status. \ */ \ mfspr r10,SPRN_DBSR; /* check single-step/branch taken */ \ andis. r10,r10,[EMAIL PROTECTED]; \ @@ -278,7 +278,7 @@ label: RFDI; \ b .;\ \ - /* continue normal handling for a critical exception... */\ + /* continue normal handling for a debug exception... */ \ 2: mfspr r4,SPRN_DBSR; \ addir3,r1,STACK_FRAME_OVERHEAD; \ EXC_XFER_TEMPLATE(DebugException, 0x2008, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, debug_transfer_to_handler, ret_from_debug_exc) -- 1.5.5.1 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc/booke: Fix definitions for dbcr[1-2] and dbsr registers
Looks good to me. Yeah moving many of the aliases to 40x is much cleaner. On Wed, 2008-06-11 at 13:38 -0500, Kumar Gala wrote: > From: Jerone Young <[EMAIL PROTECTED]> > > This takes values from the PowerPC ISA BookIII-E specifications that are > for DBCR0. Many of these values are different from those currently > specified, which are for the ppc405. Also added some bookE definitions > for DBCR1 & DBCR2. > > [ [EMAIL PROTECTED]: Added aliases to 40x DBCR0 to match Book-E, > Added enhanced debug DBCR0/DBSR _CIRPT and _CRET defines and DBSR > IRPT and RET. ] > > Signed-off-by: Jerone Young <[EMAIL PROTECTED]> > Acked-by: Josh Boyer <[EMAIL PROTECTED]> > Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> > --- > > Jerone, take a look at this one. Its in the powerpc-next branch of my git > tree. Note I've dropped some of the aliases you added and the reason is > to match the existing DBSR bits. > > - k > > include/asm-powerpc/reg_booke.h | 53 > +++ > 1 files changed, 53 insertions(+), 0 deletions(-) > > diff --git a/include/asm-powerpc/reg_booke.h b/include/asm-powerpc/reg_booke.h > index cf54a3f..8223254 100644 > --- a/include/asm-powerpc/reg_booke.h > +++ b/include/asm-powerpc/reg_booke.h > @@ -210,6 +210,7 @@ > #ifdef CONFIG_BOOKE > #define DBSR_IC 0x0800 /* Instruction Completion */ > #define DBSR_BT 0x0400 /* Branch Taken */ > +#define DBSR_IRPT0x0200 /* Exception Debug Event */ > #define DBSR_TIE 0x0100 /* Trap Instruction Event */ > #define DBSR_IAC10x0080 /* Instr Address Compare 1 Event */ > #define DBSR_IAC20x0040 /* Instr Address Compare 2 Event */ > @@ -219,10 +220,14 @@ > #define DBSR_DAC1W 0x0004 /* Data Addr Compare 1 Write Event */ > #define DBSR_DAC2R 0x0002 /* Data Addr Compare 2 Read Event */ > #define DBSR_DAC2W 0x0001 /* Data Addr Compare 2 Write Event */ > +#define DBSR_RET 0x8000 /* Return Debug Event */ > +#define DBSR_CIRPT 0x0040 /* Critical Interrupt Taken Event */ > +#define DBSR_CRET0x0020 /* Critical Return Debug Event */ > #endif > #ifdef CONFIG_40x > #define DBSR_IC 0x8000 /* Instruction Completion */ > #define DBSR_BT 0x4000 /* Branch taken */ > +#define DBSR_IRPT0x2000 /* Exception Debug Event */ > #define DBSR_TIE 0x1000 /* Trap Instruction debug Event */ > #define DBSR_IAC10x0400 /* Instruction Address Compare 1 Event > */ > #define DBSR_IAC20x0200 /* Instruction Address Compare 2 Event > */ > @@ -253,6 +258,7 @@ > #define ESR_BO 0x0002 /* Byte Ordering */ > > /* Bit definitions related to the DBCR0. */ > +#if defined(CONFIG_40x) > #define DBCR0_EDM0x8000 /* External Debug Mode */ > #define DBCR0_IDM0x4000 /* Internal Debug Mode */ > #define DBCR0_RST0x3000 /* all the bits in the RST field */ > @@ -261,20 +267,67 @@ > #define DBCR0_RST_CORE 0x1000 /* Core Reset */ > #define DBCR0_RST_NONE 0x /* No Reset */ > #define DBCR0_IC 0x0800 /* Instruction Completion */ > +#define DBCR0_ICMP DBCR0_IC > #define DBCR0_BT 0x0400 /* Branch Taken */ > +#define DBCR0_BRTDBCR0_BT > #define DBCR0_EDE0x0200 /* Exception Debug Event */ > +#define DBCR0_IRPT DBCR0_EDE > #define DBCR0_TDE0x0100 /* TRAP Debug Event */ > #define DBCR0_IA10x0080 /* Instr Addr compare 1 enable */ > +#define DBCR0_IAC1 DBCR0_IA1 > #define DBCR0_IA20x0040 /* Instr Addr compare 2 enable */ > +#define DBCR0_IAC2 DBCR0_IA2 > #define DBCR0_IA12 0x0020 /* Instr Addr 1-2 range enable */ > #define DBCR0_IA12X 0x0010 /* Instr Addr 1-2 range eXclusive */ > #define DBCR0_IA30x0008 /* Instr Addr compare 3 enable */ > +#define DBCR0_IAC3 DBCR0_IA3 > #define DBCR0_IA40x0004 /* Instr Addr compare 4 enable */ > +#define DBCR0_IAC4 DBCR0_IA4 > #define DBCR0_IA34 0x0002 /* Instr Addr 3-4 range Enable */ > #define DBCR0_IA34X 0x0001 /* Instr Addr 3-4 range eXclusive */ > #define DBCR0_IA12T 0x8000 /* Instr Addr 1-2 range Toggle */ > #define DBCR0_IA34T 0x4000 /* Instr Addr 3-4 range Toggle */ > #define DBCR0_FT 0x0001 /* Freeze Timers on debug event */ > +#elif defined(CONFIG_BOOKE) > +#define DBCR0_EDM0x8000 /* External Debug Mode */ > +#define DBCR0_IDM0x4000 /* Internal Debug Mode */ > +#define DBCR0_RST0x3000 /* all the bits in the RST field */ > +/* DBCR0_RST_* is 44x specific and not followed in fsl booke */ > +#define DBCR0_RST_SYSTEM 0x3000 /* System Reset */ > +#define DBCR0_RST_CHIP 0x2000 /* Chip Reset */ > +#define DBCR0_RST_CORE
mpc52xx_psc.h
Why was the fifo struct separated from the psc struct for the 5200? I see comments like this now: /* On the 5200, fifo regs are immediately adjacent to the psc regs */ mps->fifo = ((void __iomem *)mps->psc) + sizeof(struct mpc52xx_psc); Couldn't the fifo struct be a member at the end of the psc struct? /* Structure of the hardware registers */ struct mpc52xx_psc { u8 mode; /* PSC + 0x00 */ u8 reserved0[3]; .. u8 irmdr; /* PSC + 0x50 */ u8 reserved16[3]; u8 irfdr; /* PSC + 0x54 */ u8 reserved17[3]; struct mpc52xx_psc_fifo fifo; /* like this? */ }; -- Jon Smirl [EMAIL PROTECTED] ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: 4xx support in arch/ppc is going away Real Soon Now
В Sun, 08 Jun 2008 10:54:41 -0500 Jon Loeliger <[EMAIL PROTECTED]> пишет: > > Grant Likely writes: > > > > > Oh, and we're going try to create the longest acked-by chain in > > > Linux history. > > > > Cool :) > > > > Paul. > > So far, I think it looks like this, sorted: > > Acked-by: Arnd Bergmann <[EMAIL PROTECTED]> > Acked-by: Becky Bruce <[EMAIL PROTECTED]> > Acked-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]> > Acked-by: Grant Likely <[EMAIL PROTECTED]> > Acked-by: Jochen Friedrich <[EMAIL PROTECTED]> > Acked-by: Jon Loeliger <[EMAIL PROTECTED]> > Acked-by: Josh Boyer <[EMAIL PROTECTED]> > Acked-by: Kumar Gala <[EMAIL PROTECTED]> > Acked-by: Olof Johansson <[EMAIL PROTECTED]> > Acked-by: Peter Korsgaard <[EMAIL PROTECTED]> > Acked-by: Scott Wood <[EMAIL PROTECTED]> > Acked-by: Sean MacLennan <[EMAIL PROTECTED]> > Acked-by: Segher Boessenkool <[EMAIL PROTECTED]> > Acked-by: Stefan Roese <[EMAIL PROTECTED]> > Acked-by: Stephen Neuendorffer <[EMAIL PROTECTED]> > Acked-by: Wolfgang Denk <[EMAIL PROTECTED]> > > I'm not sure, but I _think_ there are a few other PowerPC > developers out there still... :-) > With a little delay, but how could I miss it :) Acked-by: Vitaly Bordug <[EMAIL PROTECTED]> > jdl > ___ > Linuxppc-dev mailing list > Linuxppc-dev@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-dev ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] irda: driver for Freescale FIRI controller
Hi Anton, On Wed, Jun 04, 2008 at 07:45:10PM +0400, Anton Vorontsov wrote: > From: Zhang Wei <[EMAIL PROTECTED]> > > The driver supports SIR, MIR, FIR modes and maximum 400bps rate. > > Signed-off-by: Zhang Wei <[EMAIL PROTECTED]> > [AV: few small fixes, plus had made platform ops passing via node->data > to avoid #ifdef stuff in the fsl_soc (think DIU). ] > Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> Some comments below: > diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig > index ce816ba..da24f57 100644 > --- a/drivers/net/irda/Kconfig > +++ b/drivers/net/irda/Kconfig > @@ -341,5 +341,10 @@ config MCS_FIR > To compile it as a module, choose M here: the module will be called > mcs7780. > > +config FSL_FIR > + tristate "Freescale Irda driver" I guess you could be a little more descriptive here. At least specify which chipsets this driver support, and that it is a FIR one. > --- /dev/null > +++ b/drivers/net/irda/fsl_ir.c > @@ -0,0 +1,792 @@ > +/* > + * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved. > + * > + * Author: Zhang Wei, [EMAIL PROTECTED], Oct. 2007 > + * > + * Description: > + * The IrDA driver for Freescale PowerPC MPC8610 processor. The driver > + * support SIR and FIR mode. The maximum speed is 4Mbps. > + * > + * Changelog: > + * Oct 2007 Zhang Wei <[EMAIL PROTECTED]> > + * - Initial version. > + * > + * This file is part of the Linux kernel > + * > + * This is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License as published by > + * the Free Software Foundation; either version 2 of the License, or > + * (at your option) any later version. > + * > + */ > + > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > + > +#include > + > +#define is_sir_speed(speed) ((speed <= 115200) ? 1 : 0) > +#define is_sir(ir) (is_sir_speed(ir->speed)) > + > +static void init_iobuf(iobuff_t *io, void *buff, int size) > +{ > + io->head = buff; > + io->truesize = size; > + io->in_frame = FALSE; > + io->state = OUTSIDE_FRAME; > + io->data = io->head; > + io->skb = NULL; > +} > + > +static void ir_switch_mode(struct fsl_ir *ir, u32 speed) > +{ > + > + if (ir->speed && (ir->speed < 115200)) /* Switch from SIR to FIR */ Dont you want <= 115200 here ? > + /* Disable SIRI */ > + clrbits32(&ir->reg_base->scr1, FSL_IR_SCR1_IREN | > + FSL_IR_SCR1_SIRIEN); > + else { /* Switch from FIR to SIR */ > + /* Disable FIRI */ > + out_be32(&ir->reg_base->firitcr, 0); > + out_be32(&ir->reg_base->firircr, 0); > + } > + > + /* Switch the IrDA mode on board */ > + if (ir->plat_op && ir->plat_op->set_ir_mode) > + ir->plat_op->set_ir_mode(ir, speed); > +} > + > +static int ir_crc_len(struct fsl_ir *ir) > +{ > + int crc_len; > + > + switch (ir->speed) { > + case 576000: > + case 1152000: > + crc_len = 2;/* CRC16, 16 bits */ > + break; > + case 400: > + crc_len = 4;/* CRC32, 32 bits */ > + break; > + default: > + crc_len = 0; > + break; > + } > + return crc_len; > +} > + > +static void fir_rx(struct fsl_ir *ir, int len) > +{ > + struct net_device *ndev = dev_get_drvdata(ir->dev); > + struct sk_buff *skb; > + int i; > + > + if (len <= ir_crc_len(ir)) > + return; > + > + do_gettimeofday(&ir->stamp); > + /* Now, for new packet arriving */ > + skb = alloc_skb(len + 1, GFP_ATOMIC); Please use dev_alloc_skb here. > + if (!skb) { > + ir->stats.rx_dropped++; > + return; > + } > + skb_reserve(skb, 1); A comment here describing why you need a 1 byte header would be nice. > + > + for (i = 0; i < len; i++) > + skb->data[i] = in_8((u8 *)&ir->reg_base->rfifo); > + > + len -= ir_crc_len(ir); > + skb_put(skb, len); > + > + ir->stats.rx_packets++; > + ir->stats.rx_bytes += len; > + > + skb->dev = ndev; > + skb_reset_mac_header(skb); > + skb->protocol = htons(ETH_P_IRDA); > + netif_rx(skb); > +} On a general note, this RX routine could be part of a bottom half. You're calling this from the IRQ handler, and this may not be a good idea. > + > +static void fir_tx(struct fsl_ir *ir) > +{ > + int free_bytes; > + struct sk_buff *skb = ir->tx_buff.skb; > + size_t len; > + > + if (!skb) > + return; > + > + spin_lock(&ir->tx_lock); > + do { > + free_bytes = 128 - > + ((in_be32(&ir->reg_base->firitsr) >> 8) & 0xff); > + for (len = min(free_bytes, ir->tx_buff.len); len > 0; > + len--, ir->tx_buff.len--) > +
[PATCH 0/4] Fix RTC for MPC8572DS and support RTC on MPC8610HPCD
Hello Kumar, The previous series scattered a bit, so I gathered it again. I've found MPC8572DS board to test RTC quirk changes that I've made for MPC8610HPCD, and it appears that without the change RTC does not work on MPC8572DS, too. So, the first patch actually fixes it for MPC8572DS, and also makes RTC work on MPC8610HPCD. I still can't test the patch on MPC8641HPCD and MPC8544DS (no boards handy), but I don't believe that the change could break these boards. I also dropped MACH_PCI_FIXUP_*() approach, and did just machine_is()s inside the fixups. I think this looks better... as far as possible for the board specific fixups. :-) -- Anton Vorontsov email: [EMAIL PROTECTED] irc://irc.freenode.net/bd2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 1/4] powerpc: fsl_uli1575: fix RTC quirk to work on MPC8572DS and MPC8610HPCD
This patch fixes RTC on MPC8572DS boards: dummy read helps only when reading at the end of the bridge's memory (i.e. outside of behind the bridge devices' assigned regions). With this change the quirk also makes RTC work on MPC8610HPCD, so it's unlikely that this will break MPC8641HPCN or MPC8544DS boards. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- arch/powerpc/platforms/fsl_uli1575.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c index afc9141..756561c 100644 --- a/arch/powerpc/platforms/fsl_uli1575.c +++ b/arch/powerpc/platforms/fsl_uli1575.c @@ -221,7 +221,7 @@ static void __devinit quirk_final_uli5249(struct pci_dev *dev) for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { if ((bus->resource[i]) && (bus->resource[i]->flags & IORESOURCE_MEM)) { - dummy = ioremap(bus->resource[i]->start, 0x4); + dummy = ioremap(bus->resource[i]->end - 3, 0x4); if (dummy) { in_8(dummy); iounmap(dummy); -- 1.5.5.4 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 2/4] powerpc/85xx/86xx: some refactoring for fsl_uli1575 code
- Get rid of uses_fsl_uli_m1575, it does not scale for all cases. Instead, let's explicitly use machine_is() for each fixup. - Factor out MPC8610HPCD quirks to fsl_uli1575, and protect them with machine_is(). One step closer to multiplatform kernels. - Actually use fsl_uli1575 on MPC8610HPCD, so RTC quirk will be applied. - RTC quirk applies to all boards though, so no machine_is() checks. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- arch/powerpc/platforms/85xx/mpc85xx_ds.c |2 - arch/powerpc/platforms/86xx/Kconfig|1 + arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 87 - arch/powerpc/platforms/86xx/mpc86xx_hpcn.c |2 - arch/powerpc/platforms/fsl_uli1575.c | 115 ++-- 5 files changed, 108 insertions(+), 99 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index b010dc9..f21e7a6 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -115,7 +115,6 @@ void __init mpc85xx_ds_pic_init(void) #ifdef CONFIG_PCI static int primary_phb_addr; -extern int uses_fsl_uli_m1575; extern int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn); @@ -161,7 +160,6 @@ static void __init mpc85xx_ds_setup_arch(void) } } - uses_fsl_uli_m1575 = 1; ppc_md.pci_exclude_device = mpc85xx_exclude_device; #endif diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig index 053f49a..39c02af 100644 --- a/arch/powerpc/platforms/86xx/Kconfig +++ b/arch/powerpc/platforms/86xx/Kconfig @@ -21,6 +21,7 @@ config SBC8641D config MPC8610_HPCD bool "Freescale MPC8610 HPCD" select DEFAULT_UIMAGE + select FSL_ULI1575 help This option enables support for the MPC8610 HPCD board. diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c index eb16208..539a6ad 100644 --- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c +++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c @@ -78,93 +78,6 @@ static void __init mpc86xx_hpcd_init_irq(void) mpic_init(mpic1); } -#ifdef CONFIG_PCI -static void __devinit quirk_uli1575(struct pci_dev *dev) -{ - u32 temp32; - - /* Disable INTx */ - pci_read_config_dword(dev, 0x48, &temp32); - pci_write_config_dword(dev, 0x48, (temp32 | 1<<26)); - - /* Enable sideband interrupt */ - pci_read_config_dword(dev, 0x90, &temp32); - pci_write_config_dword(dev, 0x90, (temp32 | 1<<22)); -} - -static void __devinit quirk_uli5288(struct pci_dev *dev) -{ - unsigned char c; - unsigned short temp; - - /* Interrupt Disable, Needed when SATA disabled */ - pci_read_config_word(dev, PCI_COMMAND, &temp); - temp |= 1<<10; - pci_write_config_word(dev, PCI_COMMAND, temp); - - pci_read_config_byte(dev, 0x83, &c); - c |= 0x80; - pci_write_config_byte(dev, 0x83, c); - - pci_write_config_byte(dev, PCI_CLASS_PROG, 0x01); - pci_write_config_byte(dev, PCI_CLASS_DEVICE, 0x06); - - pci_read_config_byte(dev, 0x83, &c); - c &= 0x7f; - pci_write_config_byte(dev, 0x83, c); -} - -/* - * Since 8259PIC was disabled on the board, the IDE device can not - * use the legacy IRQ, we need to let the IDE device work under - * native mode and use the interrupt line like other PCI devices. - * IRQ14 is a sideband interrupt from IDE device to CPU and we use this - * as the interrupt for IDE device. - */ -static void __devinit quirk_uli5229(struct pci_dev *dev) -{ - unsigned char c; - - pci_read_config_byte(dev, 0x4b, &c); - c |= 0x10; - pci_write_config_byte(dev, 0x4b, c); -} - -/* - * SATA interrupt pin bug fix - * There's a chip bug for 5288, The interrupt pin should be 2, - * not the read only value 1, So it use INTB#, not INTA# which - * actually used by the IDE device 5229. - * As of this bug, during the PCI initialization, 5288 read the - * irq of IDE device from the device tree, this function fix this - * bug by re-assigning a correct irq to 5288. - * - */ -static void __devinit final_uli5288(struct pci_dev *dev) -{ - struct pci_controller *hose = pci_bus_to_host(dev->bus); - struct device_node *hosenode = hose ? hose->dn : NULL; - struct of_irq oirq; - int virq, pin = 2; - u32 laddr[3]; - - if (!hosenode) - return; - - laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(31, 0) << 8); - laddr[1] = laddr[2] = 0; - of_irq_map_raw(hosenode, &pin, 1, laddr, &oirq); - virq = irq_create_of_mapping(oirq.controller, oirq.specifier, -oirq.size); - dev->irq = virq; -} - -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, quirk_uli1575); -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, quirk_uli5288); -DE
[PATCH 3/4] powerpc: rtc_cmos_setup: assign interrupts only if there is i8259 PIC
i8259 PIC is disabled on MPC8610HPCD boards, thus currently rtc-cmos driver fails to probe. To fix the issue, we lookup the device tree for "chrp,iic" and "pnpPNP,000" compatible devices, and if not found we do not assign RTC IRQ and assuming that i8259 was disabled. Though this patch fixes RTC on some boards (and surely should not break any other), the whole approach is still broken. We can't easily fix this though, because old device trees do not specify i8259 interrupts for the cmos rtc node. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- arch/powerpc/sysdev/rtc_cmos_setup.c | 23 +-- 1 files changed, 17 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/sysdev/rtc_cmos_setup.c b/arch/powerpc/sysdev/rtc_cmos_setup.c index c09ddc0..c1879eb 100644 --- a/arch/powerpc/sysdev/rtc_cmos_setup.c +++ b/arch/powerpc/sysdev/rtc_cmos_setup.c @@ -21,6 +21,7 @@ static int __init add_rtc(void) struct device_node *np; struct platform_device *pd; struct resource res[2]; + unsigned int num_res = 1; int ret; memset(&res, 0, sizeof(res)); @@ -41,14 +42,24 @@ static int __init add_rtc(void) if (res[0].start != RTC_PORT(0)) return -EINVAL; - /* Use a fixed interrupt value of 8 since on PPC if we are using this -* its off an i8259 which we ensure has interrupt numbers 0..15. */ - res[1].start = 8; - res[1].end = 8; - res[1].flags = IORESOURCE_IRQ; + np = of_find_compatible_node(NULL, NULL, "chrp,iic"); + if (!np) + np = of_find_compatible_node(NULL, NULL, "pnpPNP,000"); + if (np) { + of_node_put(np); + /* +* Use a fixed interrupt value of 8 since on PPC if we are +* using this its off an i8259 which we ensure has interrupt +* numbers 0..15. +*/ + res[1].start = 8; + res[1].end = 8; + res[1].flags = IORESOURCE_IRQ; + num_res++; + } pd = platform_device_register_simple("rtc_cmos", -1, -&res[0], 2); +&res[0], num_res); if (IS_ERR(pd)) return PTR_ERR(pd); -- 1.5.5.4 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 4/4] powerpc/86xx: mpc8610_hpcd: add support for ULI RTC
The ULI "Super South Bridge" contains ISA bridge to the legacy devices, such as Super IO mouse/keyboard/floppy disk controllers, parallel port, i8259 interrupt controller and so on. i8259 is disabled on the MPC8610HPCD, and other peripherals are not traced out. So we use only RTC. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mpc8610_hpcd.dts | 14 +++ arch/powerpc/configs/mpc8610_hpcd_defconfig | 51 -- 2 files changed, 61 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts index 65a5f64..c4507cd 100644 --- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts +++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts @@ -388,6 +388,20 @@ 0x0100 0x0 0x 0x0100 0x0 0x 0x0 0x0010>; + + [EMAIL PROTECTED] { + device_type = "isa"; + #size-cells = <1>; + #address-cells = <2>; + reg = <0xf000 0 0 0 0>; + ranges = <1 0 0x0100 0 0 + 0x1000>; + + [EMAIL PROTECTED] { + compatible = "pnpPNP,b00"; + reg = <1 0x70 2>; + }; + }; }; }; }; diff --git a/arch/powerpc/configs/mpc8610_hpcd_defconfig b/arch/powerpc/configs/mpc8610_hpcd_defconfig index 7e5b9ce..5885597 100644 --- a/arch/powerpc/configs/mpc8610_hpcd_defconfig +++ b/arch/powerpc/configs/mpc8610_hpcd_defconfig @@ -813,7 +813,6 @@ CONFIG_UNIX98_PTYS=y # CONFIG_IPMI_HANDLER is not set # CONFIG_HW_RANDOM is not set # CONFIG_NVRAM is not set -# CONFIG_GEN_RTC is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set # CONFIG_RAW_DRIVER is not set @@ -1065,12 +1064,56 @@ CONFIG_USB_ARCH_HAS_EHCI=y # CONFIG_NEW_LEDS is not set # CONFIG_INFINIBAND is not set # CONFIG_EDAC is not set -# CONFIG_RTC_CLASS is not set -# CONFIG_DMADEVICES is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set +# CONFIG_RTC_DRV_S35390A is not set # -# Userspace I/O +# SPI RTC drivers # + +# +# Platform RTC drivers +# +CONFIG_RTC_DRV_CMOS=y +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# +# CONFIG_DMADEVICES is not set # CONFIG_UIO is not set # -- 1.5.5.4 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] powerpc/QE: use arch_initcall to probe QUICC Engine GPIOs
It was discussed that global arch_initcall() is preferred way to probe QE GPIOs, so let's use it. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- On Wed, Jun 11, 2008 at 08:52:16AM -0500, Kumar Gala wrote: [...] >>> applied. >> >> I've just rebased on the pushed out powerpc-next branch, and noticed >> that you merged this patch from the old series. >> >> The difference is in absence of arch_initcall() for QE GPIOs >> initialization, i.e. in this version boards should explicitly call >> qe_add_gpiochips(). So.. was this done deliberately? Or should I send >> you an update? > > just send me an update to my tree at this point. Here it is. Thanks, arch/powerpc/sysdev/qe_lib/gpio.c |5 - include/asm-powerpc/qe.h |1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/qe_lib/gpio.c b/arch/powerpc/sysdev/qe_lib/gpio.c index c712e24..8e5a0bc 100644 --- a/arch/powerpc/sysdev/qe_lib/gpio.c +++ b/arch/powerpc/sysdev/qe_lib/gpio.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include @@ -102,7 +103,7 @@ static int qe_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) return 0; } -void __init qe_add_gpiochips(void) +static int __init qe_add_gpiochips(void) { struct device_node *np; @@ -143,4 +144,6 @@ err: kfree(qe_gc); /* try others anyway */ } + return 0; } +arch_initcall(qe_add_gpiochips); diff --git a/include/asm-powerpc/qe.h b/include/asm-powerpc/qe.h index 1355e72..edee15d 100644 --- a/include/asm-powerpc/qe.h +++ b/include/asm-powerpc/qe.h @@ -101,7 +101,6 @@ struct qe_pio_regs { #endif }; -extern void __init qe_add_gpiochips(void); extern int par_io_init(struct device_node *np); extern int par_io_of_config(struct device_node *np); #define QE_PIO_DIR_IN 2 -- 1.5.5.4 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] [85xx] powerpc: Update pin setup for 8560ads
Ports B and C pins programming is changed to get SCC2 UART and FCC3 ethernet work. Signed-off-by: Vitaly Bordug <[EMAIL PROTECTED]> --- arch/powerpc/platforms/85xx/mpc85xx_ads.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c index 3582c84..ba498d6 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c @@ -119,6 +119,8 @@ static const struct cpm_pin mpc8560_ads_pins[] = { {3, 31, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* SCC2 */ + {2, 12, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, + {2, 13, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {3, 26, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {3, 27, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {3, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, @@ -145,7 +147,6 @@ static const struct cpm_pin mpc8560_ads_pins[] = { {1, 4, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {1, 5, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {1, 6, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, - {1, 7, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {1, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {1, 9, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {1, 10, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, @@ -156,8 +157,9 @@ static const struct cpm_pin mpc8560_ads_pins[] = { {1, 15, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {1, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {1, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, - {2, 16, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* CLK16 */ - {2, 17, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* CLK15 */ + {2, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK16 */ + {2, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK15 */ + {2, 27, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, }; static void __init init_ioports(void) ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] [82xx] powerpc: Add support for mpc8247 based board MGCOGE from keymile.
From: Heiko Schocher <[EMAIL PROTECTED]> Updated version was posted to ML: http://patchwork.ozlabs.org/linuxppc/patch?id=17250, no new feedback acquired. Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]> Signed-off-by: Vitaly Bordug <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mgcoge.dts | 165 ++ arch/powerpc/configs/mgcoge_defconfig | 900 + arch/powerpc/platforms/82xx/Kconfig |9 arch/powerpc/platforms/82xx/Makefile |1 arch/powerpc/platforms/82xx/mgcoge.c | 130 + 5 files changed, 1205 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/boot/dts/mgcoge.dts create mode 100644 arch/powerpc/configs/mgcoge_defconfig create mode 100644 arch/powerpc/platforms/82xx/mgcoge.c diff --git a/arch/powerpc/boot/dts/mgcoge.dts b/arch/powerpc/boot/dts/mgcoge.dts new file mode 100644 index 000..ac28ebc --- /dev/null +++ b/arch/powerpc/boot/dts/mgcoge.dts @@ -0,0 +1,165 @@ +/* + * Device Tree for the MGCOGE plattform from keymile + * + * Copyright 2008 DENX Software Engineering GmbH + * Heiko Schocher <[EMAIL PROTECTED]> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +/dts-v1/; +/ { + model = "MGCOGE"; + compatible = "keymile,mgcoge"; + #address-cells = <1>; + #size-cells = <1>; + + aliases { + ethernet0 = ð0; + serial0 = &smc2; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + PowerPC,[EMAIL PROTECTED] { + device_type = "cpu"; + reg = <0>; + d-cache-line-size = <32>; + i-cache-line-size = <32>; + d-cache-size = <16384>; + i-cache-size = <16384>; + timebase-frequency = <0>; /* Filled in by U-Boot */ + clock-frequency = <0>; /* Filled in by U-Boot */ + bus-frequency = <0>; /* Filled in by U-Boot */ + }; + }; + + [EMAIL PROTECTED] { + compatible = "fsl,mpc8247-localbus", +"fsl,pq2-localbus", +"simple-bus"; + #address-cells = <2>; + #size-cells = <1>; + reg = <0xf0010100 0x40>; + + ranges = <0 0 0xfe00 0x0040 + 1 0 0x5000 0x2000 + >; /* Filled in by U-Boot */ + + [EMAIL PROTECTED],0 { + compatible = "cfi-flash"; + reg = <0 0x0 0x40>; + #address-cells = <1>; + #size-cells = <1>; + bank-width = <1>; + device-width = <1>; + [EMAIL PROTECTED] { + label = "u-boot"; + reg = <0 0x4>; + }; + [EMAIL PROTECTED] { + label = "env"; + reg = <0x4 0x2>; + }; + [EMAIL PROTECTED] { + label = "user"; + reg = <0x6 0x3a>; + }; + }; + + [EMAIL PROTECTED],0 { + compatible = "cfi-flash"; + reg = <1 0x0 0x200>; + #address-cells = <1>; + #size-cells = <1>; + bank-width = <2>; + device-width = <2>; + [EMAIL PROTECTED] { + label = "cfg"; + reg = <0 0x200>; + }; + }; + }; + + memory { + device_type = "memory"; + reg = <0 0>; /* Filled in by U-Boot */ + }; + + [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,mpc8247-immr", "fsl,pq2-soc", "simple-bus"; + ranges = <0x 0xf000 0x00053000>; + + // Temporary until code stops depending on it. + device_type = "soc"; + + [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <1>; + #interrupt-cells = <2>; + compatible = "fsl,mpc8247-cpm", "fsl,cpm2", + "simple-bus"; + reg = <0x119c0 0x30>; + ranges; + + muram { +
[PATCH] [fs_enet] powerpc: Fix SCC Ethernet on CPM2, and crash in fs_enet_rx_napi()
From: Heiko Schocher <[EMAIL PROTECTED]> Initially posted on: http://ozlabs.org/pipermail/linuxppc-dev/2008-January/049682.html Feedback is addressed in this version (yes, this patch was floating around for a while...) Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]> Signed-off-by: Vitaly Bordug <[EMAIL PROTECTED]> --- drivers/net/fs_enet/fs_enet-main.c | 10 +- drivers/net/fs_enet/mac-scc.c |8 +++- include/asm-powerpc/cpm2.h |5 + 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index a5baaf5..31c9693 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c @@ -804,6 +804,10 @@ static int fs_enet_open(struct net_device *dev) int r; int err; + /* to initialize the fep->cur_rx,... */ + /* not doing this, will cause a crash in fs_enet_rx_napi */ + fs_init_bds(fep->ndev); + if (fep->fpi->use_napi) napi_enable(&fep->napi); @@ -982,6 +986,7 @@ static struct net_device *fs_init_instance(struct device *dev, fep = netdev_priv(ndev); fep->dev = dev; + fep->ndev = ndev; dev_set_drvdata(dev, ndev); fep->fpi = fpi; if (fpi->init_ioports) @@ -1085,7 +1090,6 @@ static struct net_device *fs_init_instance(struct device *dev, } registered = 1; - return ndev; err: @@ -1354,6 +1358,10 @@ static struct of_device_id fs_enet_match[] = { .compatible = "fsl,cpm1-scc-enet", .data = (void *)&fs_scc_ops, }, + { + .compatible = "fsl,cpm2-scc-enet", + .data = (void *)&fs_scc_ops, + }, #endif #ifdef CONFIG_FS_ENET_HAS_FCC { diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index d7ca319..f2b64a7 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c @@ -50,7 +50,6 @@ #include "fs_enet.h" /*/ - #if defined(CONFIG_CPM1) /* for a 8xx __raw_xxx's are sufficient */ #define __fs_out32(addr, x)__raw_writel(x, addr) @@ -65,6 +64,8 @@ #define __fs_out16(addr, x)out_be16(addr, x) #define __fs_in32(addr)in_be32(addr) #define __fs_in16(addr)in_be16(addr) +#define __fs_out8(addr, x) out_8(addr, x) +#define __fs_in8(addr) in_8(addr) #endif /* write, read, set bits, clear bits */ @@ -297,8 +298,13 @@ static void restart(struct net_device *dev) /* Initialize function code registers for big-endian. */ +#ifndef CONFIG_NOT_COHERENT_CACHE + W8(ep, sen_genscc.scc_rfcr, SCC_EB | SCC_GBL); + W8(ep, sen_genscc.scc_tfcr, SCC_EB | SCC_GBL); +#else W8(ep, sen_genscc.scc_rfcr, SCC_EB); W8(ep, sen_genscc.scc_tfcr, SCC_EB); +#endif /* Set maximum bytes per receive buffer. * This appears to be an Ethernet frame size, not the buffer diff --git a/include/asm-powerpc/cpm2.h b/include/asm-powerpc/cpm2.h index 4c85ed9..3bdff75 100644 --- a/include/asm-powerpc/cpm2.h +++ b/include/asm-powerpc/cpm2.h @@ -343,6 +343,11 @@ typedef struct scc_param { uintscc_tcrc; /* Internal */ } sccp_t; +/* Function code bits. +*/ +#define SCC_EB ((u_char) 0x10) /* Set big endian byte order */ +#define SCC_GBL((u_char) 0x20) /* Snooping enabled */ + /* CPM Ethernet through SCC1. */ typedef struct scc_enet { ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] [8xx] powerpc: Add support for the MPC852 based mgsuvd board from keymile.
From: Heiko Schocher <[EMAIL PROTECTED]> Supported SMC1 (serial console), SCC3 Ethernet (10Mbps hdx). Updated version was posted to ML; http://patchwork.ozlabs.org/linuxppc/patch?id=17398 Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]> Signed-off-by: Vitaly Bordug <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mgsuvd.dts | 158 ++ arch/powerpc/configs/mgsuvd_defconfig | 872 + arch/powerpc/platforms/8xx/Kconfig|7 arch/powerpc/platforms/8xx/Makefile |1 arch/powerpc/platforms/8xx/mgsuvd.c | 95 5 files changed, 1133 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/boot/dts/mgsuvd.dts create mode 100644 arch/powerpc/configs/mgsuvd_defconfig create mode 100644 arch/powerpc/platforms/8xx/mgsuvd.c diff --git a/arch/powerpc/boot/dts/mgsuvd.dts b/arch/powerpc/boot/dts/mgsuvd.dts new file mode 100644 index 000..59f9239 --- /dev/null +++ b/arch/powerpc/boot/dts/mgsuvd.dts @@ -0,0 +1,158 @@ +/* + * MGSUVD Device Tree Source + * + * Copyright 2008 DENX Software Engineering GmbH + * Heiko Schocher <[EMAIL PROTECTED]> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +/dts-v1/; +/ { + model = "MGSUVD"; + compatible = "keymile,mgsuvd"; + #address-cells = <1>; + #size-cells = <1>; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + PowerPC,[EMAIL PROTECTED] { + device_type = "cpu"; + reg = <0>; + d-cache-line-size = <16>; + i-cache-line-size = <16>; + d-cache-size = <8192>; + i-cache-size = <8192>; + timebase-frequency = <0>; /* Filled in by u-boot */ + bus-frequency = <0>;/* Filled in by u-boot */ + clock-frequency = <0>; /* Filled in by u-boot */ + interrupts = <0x0f 2>; /* decrementer interrupt */ + interrupt-parent = <&PIC>; + }; + }; + + memory { + device_type = "memory"; + reg = < 0x400>; /* Filled in by u-boot */ + }; + + [EMAIL PROTECTED] { + compatible = "fsl,pq1-localbus"; + #address-cells = <2>; + #size-cells = <1>; + reg = <0xfff00100 0x40>; + + ranges = < + 0 0 0xf000 0x0100 + >; /* Filled in by u-boot */ + + [EMAIL PROTECTED],0 { + compatible = "cfi-flash"; + reg = <0 0 0x100>; + #address-cells = <1>; + #size-cells = <1>; + bank-width = <1>; + device-width = <1>; + [EMAIL PROTECTED] { + label = "u-boot"; + reg = <0 0x8>; + }; + [EMAIL PROTECTED] { + label = "env"; + reg = <0x8 0x2>; + }; + [EMAIL PROTECTED] { + label = "user"; + reg = <0xa 0xf6>; + }; + }; + }; + + [EMAIL PROTECTED] { + compatible = "fsl,mpc885", "fsl,pq1-soc"; + #address-cells = <1>; + #size-cells = <1>; + device_type = "soc"; + ranges = <0 0xfff0 0x4000>; + + PIC: [EMAIL PROTECTED] { + interrupt-controller; + #interrupt-cells = <2>; + reg = <0 24>; + compatible = "fsl,pq1-pic"; + }; + + [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,cpm1"; + command-proc = <0x9c0>; + interrupts = <0>; /* cpm error interrupt */ + interrupt-parent = <&CPM_PIC>; + reg = <0x9c0 10>; + ranges; + + [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x2000 0x2000>; + + [EMAIL PROTECTED] { + compatible = "fsl,cpm-muram-data"; + reg = <0x800 0x1
Re: mpc52xx_psc.h
On Wed, Jun 11, 2008 at 3:05 PM, Jon Smirl <[EMAIL PROTECTED]> wrote: > Why was the fifo struct separated from the psc struct for the 5200? > > I see comments like this now: >/* On the 5200, fifo regs are immediately adjacent to the psc regs */ >mps->fifo = ((void __iomem *)mps->psc) + sizeof(struct mpc52xx_psc); > > Couldn't the fifo struct be a member at the end of the psc struct? The mpc5121 uses the same PSC register structure, but the fifo regs are no longer adjacent. Cheers, g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: linux-next: powerpc build failure
Ingo Molnar writes: > could this be a tool chain limitation perhaps, or a gcc bug? Or does the > allyesconfig size go beyond some fundamental hardware limitation. (i > doubt it's the latter) Direct unconditional branches, including procedure calls, can only reach +/- 32MB from the address of the branch on powerpc. So if the image grows to more than 32MB of text there is a problem unless the linker is smart enough to insert trampolines. I don't know whether GNU ld is that smart. I'm cc'ing Alan Modra who would know the answer to that. Paul. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: linux-next: powerpc build failure
On Thu, Jun 12, 2008 at 11:38:19AM +1000, Paul Mackerras wrote: > Direct unconditional branches, including procedure calls, can only > reach +/- 32MB from the address of the branch on powerpc. So if the > image grows to more than 32MB of text there is a problem unless the > linker is smart enough to insert trampolines. I don't know whether > GNU ld is that smart. It is, but you need to pass --relax to enable generation of the trampolines. -- Alan Modra Australia Development Lab, IBM ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev