[PATCH] powerpc: define a compat_sys_recv cond_syscall
From: Stephen Rothwell Since compat_sys_recv is an optionl syscall if the kernel is compiled without networking we need a cond_syscall defined for it since it is now wired up directly on PowerPC. Other architectures that wire up the socket calls directly as syscalls do not run into this issue either because they don't have to deal with the 32bit compat versions of the syscalls or just don't wire up that particular compat syscall directly. Signed-off-by: Stephen Rothwell Signed-off-by: Ian Munsie --- kernel/sys_ni.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c index bad369e..c782fe9 100644 --- a/kernel/sys_ni.c +++ b/kernel/sys_ni.c @@ -50,6 +50,7 @@ cond_syscall(compat_sys_sendmsg); cond_syscall(sys_recvmsg); cond_syscall(sys_recvmmsg); cond_syscall(compat_sys_recvmsg); +cond_syscall(compat_sys_recv); cond_syscall(compat_sys_recvfrom); cond_syscall(compat_sys_recvmmsg); cond_syscall(sys_socketcall); -- 1.7.1 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 2/3 v4] P4080/mtd: Only make elbc nand driver detect nand flash partitions
From: Jack Lan The former driver had the two functions: 1. detecting nand flash partitions; 2. registering elbc interrupt. Now, second function is removed to fsl_lbc.c. Signed-off-by: Lan Chunhe-B25806 Signed-off-by: Roy Zang --- drivers/mtd/nand/Kconfig |1 + drivers/mtd/nand/fsl_elbc_nand.c | 477 +++--- 2 files changed, 193 insertions(+), 285 deletions(-) diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 8b4b67c..4132c46 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -458,6 +458,7 @@ config MTD_NAND_ORION config MTD_NAND_FSL_ELBC tristate "NAND support for Freescale eLBC controllers" depends on PPC_OF + select FSL_LBC help Various Freescale chips, including the 8313, include a NAND Flash Controller Module with built-in hardware ECC capabilities. diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index 80de0bf..76ffd24 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c @@ -1,9 +1,11 @@ /* Freescale Enhanced Local Bus Controller NAND driver * - * Copyright (c) 2006-2007 Freescale Semiconductor + * Copyright (c) 2006-2007, 2010 Freescale Semiconductor * * Authors: Nick Spence , * Scott Wood + * Jack Lan + * Roy Zang * * 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 @@ -27,6 +29,7 @@ #include #include #include +#include #include #include @@ -42,14 +45,12 @@ #define ERR_BYTE 0xFF /* Value returned for read bytes when read failed */ #define FCM_TIMEOUT_MSECS 500 /* Maximum number of mSecs to wait for FCM */ -struct fsl_elbc_ctrl; - /* mtd information per set */ struct fsl_elbc_mtd { struct mtd_info mtd; struct nand_chip chip; - struct fsl_elbc_ctrl *ctrl; + struct fsl_lbc_ctrl *ctrl; struct device *dev; int bank; /* Chip select bank number */ @@ -58,18 +59,12 @@ struct fsl_elbc_mtd { unsigned int fmr; /* FCM Flash Mode Register value */ }; -/* overview of the fsl elbc controller */ +/* Freescale eLBC FCM controller infomation */ -struct fsl_elbc_ctrl { +struct fsl_elbc_fcm_ctrl { struct nand_hw_control controller; struct fsl_elbc_mtd *chips[MAX_BANKS]; - /* device info */ - struct device *dev; - struct fsl_lbc_regs __iomem *regs; - int irq; - wait_queue_head_t irq_wait; - unsigned int irq_status; /* status read from LTESR by irq handler */ u8 __iomem *addr;/* Address of assigned FCM buffer*/ unsigned int page; /* Last page written to / read from */ unsigned int read_bytes; /* Number of bytes read during command */ @@ -164,11 +159,12 @@ static void set_addr(struct mtd_info *mtd, int column, int page_addr, int oob) { struct nand_chip *chip = mtd->priv; struct fsl_elbc_mtd *priv = chip->priv; - struct fsl_elbc_ctrl *ctrl = priv->ctrl; + struct fsl_lbc_ctrl *ctrl = priv->ctrl; struct fsl_lbc_regs __iomem *lbc = ctrl->regs; + struct fsl_elbc_fcm_ctrl *elbc_fcm_ctrl = ctrl->nand; int buf_num; - ctrl->page = page_addr; + elbc_fcm_ctrl->page = page_addr; out_be32(&lbc->fbar, page_addr >> (chip->phys_erase_shift - chip->page_shift)); @@ -185,16 +181,18 @@ static void set_addr(struct mtd_info *mtd, int column, int page_addr, int oob) buf_num = page_addr & 7; } - ctrl->addr = priv->vbase + buf_num * 1024; - ctrl->index = column; + elbc_fcm_ctrl->addr = priv->vbase + buf_num * 1024; + elbc_fcm_ctrl->index = column; /* for OOB data point to the second half of the buffer */ if (oob) - ctrl->index += priv->page_size ? 2048 : 512; + elbc_fcm_ctrl->index += priv->page_size ? 2048 : 512; - dev_vdbg(ctrl->dev, "set_addr: bank=%d, ctrl->addr=0x%p (0x%p), " + dev_vdbg(priv->dev, "set_addr: bank=%d, " + "elbc_fcm_ctrl->addr=0x%p (0x%p), " "index %x, pes %d ps %d\n", -buf_num, ctrl->addr, priv->vbase, ctrl->index, +buf_num, elbc_fcm_ctrl->addr, priv->vbase, +elbc_fcm_ctrl->index, chip->phys_erase_shift, chip->page_shift); } @@ -205,18 +203,19 @@ static int fsl_elbc_run_command(struct mtd_info *mtd) { struct nand_chip *chip = mtd->priv; struct fsl_elbc_mtd *priv = chip->priv; - struct fsl_elbc_ctrl *ctrl = priv->ctrl; + struct fsl_lbc_ctrl *ctrl = priv->ctrl; + struct fsl_elbc_fcm_ctrl *elbc_fcm_ctrl = ctrl->nand; struct fsl_lbc_regs __iomem *lbc = ctrl->regs; /* Setup the FMR[OP] to execute witho
[PATCH 1/3 v4] P4080/eLBC: Make Freescale elbc interrupt common to elbc devices
From: Lan Chunhe-B25806 Move Freescale elbc interrupt from nand dirver to elbc driver. Then all elbc devices can use the interrupt instead of ONLY nand. Signed-off-by: Lan Chunhe-B25806 Signed-off-by: Roy Zang --- Comparing v3: 1. minor fix from type unsigned int to u32 2. fix platform_driver issue. 3. add mutex for nand probe arch/powerpc/Kconfig |7 +- arch/powerpc/include/asm/fsl_lbc.h | 31 +- arch/powerpc/sysdev/fsl_lbc.c | 246 ++-- 3 files changed, 242 insertions(+), 42 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 631e5a0..44df1ba 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -687,9 +687,12 @@ config 4xx_SOC bool config FSL_LBC - bool + bool "Freescale Local Bus support" + depends on FSL_SOC help - Freescale Localbus support + Enables reporting of errors from the Freescale local bus + controller. Also contains some common code used by + drivers for specific local bus peripherals. config FSL_GTM bool diff --git a/arch/powerpc/include/asm/fsl_lbc.h b/arch/powerpc/include/asm/fsl_lbc.h index 1b5a210..db94698 100644 --- a/arch/powerpc/include/asm/fsl_lbc.h +++ b/arch/powerpc/include/asm/fsl_lbc.h @@ -1,9 +1,10 @@ /* Freescale Local Bus Controller * - * Copyright (c) 2006-2007 Freescale Semiconductor + * Copyright (c) 2006-2007, 2010 Freescale Semiconductor * * Authors: Nick Spence , * Scott Wood + * Jack Lan * * 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 @@ -125,13 +126,23 @@ struct fsl_lbc_regs { #define LTESR_ATMW 0x0080 #define LTESR_ATMR 0x0040 #define LTESR_CS 0x0008 +#define LTESR_UPM 0x0002 #define LTESR_CC 0x0001 #define LTESR_NAND_MASK (LTESR_FCT | LTESR_PAR | LTESR_CC) +#define LTESR_MASK (LTESR_BM | LTESR_FCT | LTESR_PAR | LTESR_WP \ +| LTESR_ATMW | LTESR_ATMR | LTESR_CS | LTESR_UPM \ +| LTESR_CC) +#define LTESR_CLEAR0x +#define LTECCR_CLEAR 0x +#define LTESR_STATUS LTESR_MASK +#define LTEIR_ENABLE LTESR_MASK +#define LTEDR_ENABLE 0x __be32 ltedr; /**< Transfer Error Disable Register */ __be32 lteir; /**< Transfer Error Interrupt Register */ __be32 lteatr; /**< Transfer Error Attributes Register */ __be32 ltear; /**< Transfer Error Address Register */ - u8 res6[0xC]; + __be32 lteccr; /**< Transfer Error ECC Register */ + u8 res6[0x8]; __be32 lbcr;/**< Configuration Register */ #define LBCR_LDIS 0x8000 #define LBCR_LDIS_SHIFT31 @@ -265,7 +276,23 @@ static inline void fsl_upm_end_pattern(struct fsl_upm *upm) cpu_relax(); } +/* overview of the fsl lbc controller */ + +struct fsl_lbc_ctrl { + /* device info */ + struct device *dev; + struct fsl_lbc_regs __iomem *regs; + int irq; + wait_queue_head_t irq_wait; + spinlock_t lock; + void*nand; + + /* status read from LTESR by irq handler */ + unsigned intirq_status; +}; + extern int fsl_upm_run_pattern(struct fsl_upm *upm, void __iomem *io_base, u32 mar); +extern struct fsl_lbc_ctrl *fsl_lbc_ctrl_dev; #endif /* __ASM_FSL_LBC_H */ diff --git a/arch/powerpc/sysdev/fsl_lbc.c b/arch/powerpc/sysdev/fsl_lbc.c index dceb8d1..4920cd3 100644 --- a/arch/powerpc/sysdev/fsl_lbc.c +++ b/arch/powerpc/sysdev/fsl_lbc.c @@ -2,8 +2,11 @@ * Freescale LBC and UPM routines. * * Copyright (c) 2007-2008 MontaVista Software, Inc. + * Copyright (c) 2010 Freescale Semiconductor * * Author: Anton Vorontsov + * Author: Jack Lan + * Author: Roy Zang * * 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 @@ -21,37 +24,14 @@ #include #include #include +#include +#include +#include +#include static spinlock_t fsl_lbc_lock = __SPIN_LOCK_UNLOCKED(fsl_lbc_lock); -static struct fsl_lbc_regs __iomem *fsl_lbc_regs; - -static char __initdata *compat_lbc[] = { - "fsl,pq2-localbus", - "fsl,pq2pro-localbus", - "fsl,pq3-localbus", - "fsl,elbc", -}; - -static int __init fsl_lbc_init(void) -{ - struct device_node *lbus; - int i; - - for (i = 0; i < ARRAY_SIZE(compat_lbc); i++) { - lbus = of_find_compatible_node(NULL, NULL, compat_lbc[i]); - if (lbus) - goto found; - } - return -ENODEV; - -found: - fsl_lbc_regs = of_iomap(lbus, 0); - of_node_
[PATCH 3/3 v4] P4080/mtd: Fix the freescale lbc issue with 36bit mode
From: Lan Chunhe-B25806 When system uses 36bit physical address, res.start is 36bit physical address. But the function of in_be32 returns 32bit physical address. Then both of them compared each other is wrong. So by converting the address of res.start into the right format fixes this issue. Signed-off-by: Lan Chunhe-B25806 Signed-off-by: Roy Zang Reviewed-by: Anton Vorontsov --- arch/powerpc/include/asm/fsl_lbc.h |1 + arch/powerpc/sysdev/fsl_lbc.c | 23 ++- drivers/mtd/nand/fsl_elbc_nand.c |2 +- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/fsl_lbc.h b/arch/powerpc/include/asm/fsl_lbc.h index db94698..ad663e8 100644 --- a/arch/powerpc/include/asm/fsl_lbc.h +++ b/arch/powerpc/include/asm/fsl_lbc.h @@ -246,6 +246,7 @@ struct fsl_upm { int width; }; +extern u32 fsl_lbc_addr(phys_addr_t addr_base); extern int fsl_lbc_find(phys_addr_t addr_base); extern int fsl_upm_find(phys_addr_t addr_base, struct fsl_upm *upm); diff --git a/arch/powerpc/sysdev/fsl_lbc.c b/arch/powerpc/sysdev/fsl_lbc.c index 4920cd3..32c2120 100644 --- a/arch/powerpc/sysdev/fsl_lbc.c +++ b/arch/powerpc/sysdev/fsl_lbc.c @@ -34,6 +34,27 @@ struct fsl_lbc_ctrl *fsl_lbc_ctrl_dev; EXPORT_SYMBOL(fsl_lbc_ctrl_dev); /** + * fsl_lbc_addr - convert the base address + * @addr_base: base address of the memory bank + * + * This function converts a base address of lbc into the right format for the + * BR register. If the SOC has eLBC then it returns 32bit physical address + * else it convers a 34bit local bus physical address to correct format of + * 32bit address for BR register (Example: MPC8641). + */ +u32 fsl_lbc_addr(phys_addr_t addr_base) +{ + struct device_node *np = fsl_lbc_ctrl_dev->dev->of_node; + u32 addr = addr_base & 0x8000; + + if (of_device_is_compatible(np, "fsl,elbc")) + return addr; + + return addr | ((addr_base & 0x3ull) >> 19); +} +EXPORT_SYMBOL(fsl_lbc_addr); + +/** * fsl_lbc_find - find Localbus bank * @addr_base: base address of the memory bank * @@ -55,7 +76,7 @@ int fsl_lbc_find(phys_addr_t addr_base) __be32 br = in_be32(&lbc->bank[i].br); __be32 or = in_be32(&lbc->bank[i].or); - if (br & BR_V && (br & or & BR_BA) == addr_base) + if (br & BR_V && (br & or & BR_BA) == fsl_lbc_addr(addr_base)) return i; } diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index 76ffd24..227618b 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c @@ -865,7 +865,7 @@ static int __devinit fsl_elbc_nand_probe(struct platform_device *dev) (in_be32(&lbc->bank[bank].br) & BR_MSEL) == BR_MS_FCM && (in_be32(&lbc->bank[bank].br) & in_be32(&lbc->bank[bank].or) & BR_BA) -== res.start) +== fsl_lbc_addr(res.start)) break; if (bank >= MAX_BANKS) { -- 1.5.6.5 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: linux support for freescale e5500 core?
On Sep 17, 2010, at 1:36 AM, Chris Friesen wrote: > On 09/16/2010 11:33 PM, Benjamin Herrenschmidt wrote: >> On Fri, 2010-09-17 at 00:17 -0500, Kumar Gala wrote: >>> Not sure how the 970 bit worked, but this seems a bit problematic for >>> switching between kernel and application for how we do this on >>> e500mc/e5500. We'd have to touch the control bit on every exception >>> path which seems ugly to me. >> >> Unless the kernel uses dcbzl (feature fixup replacement ?) >> >> In that case it's on context switch only. > > This is basically what we did. Kernel and system libraries (glibc and > friends) always use dcbzl, process flag indicates compatibility, touch > the control bit on task context switch if the prev and next processes > have different compatibility modes. > > On the 970 you have to invalidate the entire icache whenever you change > the control bit. This is a pain involving a loop that calls icbi on 512 > cachelines. I'm pretty sure on e500mc / e5500 you only need proper sync/isync/msync after the change in the control register. - k ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Initial kernel command string (Was: Generating elf kernel ?)
Thanks for helping about the elf issue, I got it running. The problem was that I wasn't using the proper file produced by make ! Now I have a strange and probably simple problem that the Initial kernel command string is incorrect. I want, and I have set in the .config: CONFIG_CMDLINE="console=ttyUL0,115200 rw root=/dev/nfs ip=bootp" But when my kernel boots it uses: console=ttyUL0 root=/dev/ram I can check: strings arch/powerpc/boot/simpleImage.virtex405-ml405.elf | grep console Vconsole=ttyUL0 root=/dev/ram Also my previous kernel would wait for 2 seconds at the beginning to allow me to change the initial command string via the serial port, but now it just runs right through. How can I enable this option ? On the plus side it boots in .5 seconds ! Here's my .config: CONFIG_40x=y CONFIG_4xx=y CONFIG_PPC_MMU_NOHASH=y CONFIG_PPC_MMU_NOHASH_32=y CONFIG_NOT_COHERENT_CACHE=y CONFIG_PPC32=y CONFIG_WORD_SIZE=32 CONFIG_MMU=y CONFIG_GENERIC_CMOS_UPDATE=y CONFIG_GENERIC_TIME=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y CONFIG_IRQ_PER_CPU=y CONFIG_NR_IRQS=512 CONFIG_STACKTRACE_SUPPORT=y CONFIG_HAVE_LATENCYTOP_SUPPORT=y CONFIG_TRACE_IRQFLAGS_SUPPORT=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_ARCH_HAS_ILOG2_U32=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_GPIO=y CONFIG_PPC=y CONFIG_EARLY_PRINTK=y CONFIG_GENERIC_NVRAM=y CONFIG_SCHED_OMIT_FRAME_POINTER=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_PPC_OF=y CONFIG_OF=y CONFIG_PPC_UDBG_16550=y CONFIG_AUDIT_ARCH=y CONFIG_GENERIC_BUG=y CONFIG_DTC=y CONFIG_DEFAULT_UIMAGE=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_PPC_DCR_NATIVE=y CONFIG_PPC_DCR_MMIO=y CONFIG_PPC_DCR=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_PPC_ADV_DEBUG_REGS=y CONFIG_PPC_ADV_DEBUG_IACS=2 CONFIG_PPC_ADV_DEBUG_DACS=2 CONFIG_PPC_ADV_DEBUG_DVCS=0 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_CONSTRUCTORS=y CONFIG_EXPERIMENTAL=y CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_LOCALVERSION="" CONFIG_TREE_RCU=y CONFIG_RCU_FANOUT=32 CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_NAMESPACES=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y CONFIG_ANON_INODES=y CONFIG_SYSCTL_SYSCALL=y CONFIG_KALLSYMS=y CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y CONFIG_AIO=y CONFIG_HAVE_PERF_EVENTS=y CONFIG_PERF_EVENTS=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_COMPAT_BRK=y CONFIG_SLAB=y CONFIG_HAVE_OPROFILE=y CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_DMA_ATTRS=y CONFIG_HAVE_DMA_API_DEBUG=y CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y CONFIG_BASE_SMALL=0 CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_BLOCK=y CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y CONFIG_DEFAULT_CFQ=y CONFIG_DEFAULT_IOSCHED="cfq" CONFIG_INLINE_SPIN_UNLOCK=y CONFIG_INLINE_SPIN_UNLOCK_IRQ=y CONFIG_INLINE_READ_UNLOCK=y CONFIG_INLINE_READ_UNLOCK_IRQ=y CONFIG_INLINE_WRITE_UNLOCK=y CONFIG_INLINE_WRITE_UNLOCK_IRQ=y CONFIG_PPC4xx_GPIO=y CONFIG_XILINX_VIRTEX=y CONFIG_XILINX_VIRTEX_GENERIC_BOARD=y CONFIG_PPC40x_SIMPLE=y CONFIG_XILINX_VIRTEX_II_PRO=y CONFIG_XILINX_VIRTEX_4_FX=y CONFIG_IBM405_ERR77=y CONFIG_IBM405_ERR51=y CONFIG_SIMPLE_GPIO=y CONFIG_GENERIC_CLOCKEVENTS_BUILD=y CONFIG_HZ_250=y CONFIG_HZ=250 CONFIG_PREEMPT_VOLUNTARY=y CONFIG_BINFMT_ELF=y CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_ARCH_HAS_WALK_MEMORY=y CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y CONFIG_SPARSE_IRQ=y CONFIG_MAX_ACTIVE_REGIONS=32 CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_POPULATES_NODE_MAP=y CONFIG_SELECT_MEMORY_MODEL=y CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_PAGEFLAGS_EXTENDED=y CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_ZONE_DMA_FLAG=1 CONFIG_BOUNCE=y CONFIG_VIRT_TO_BUS=y CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 CONFIG_PPC_4K_PAGES=y CONFIG_FORCE_MAX_ZONEORDER=11 CONFIG_PROC_DEVICETREE=y CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE="console=ttyUL0,115200 rw root=/dev/nfs ip=bootp" CONFIG_EXTRA_TARGETS="" CONFIG_ISA_DMA_API=y CONFIG_ZONE_DMA=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_4xx_SOC=y CONFIG_PPC_PCI_CHOICE=y CONFIG_ADVANCED_OPTIONS=y CONFIG_LOWMEM_SIZE=0x3000 CONFIG_PAGE_OFFSET=0xc000 CONFIG_KERNEL_START=0xc000 CONFIG_PHYSICAL_START=0x CONFIG_TASK_SIZE=0xc000 CONFIG_CONSISTENT_SIZE=0x0020 CONFIG_NET=y CONFIG_PACKET=y CONFIG_UNIX=y CONFIG_INET=y CONFIG_IP_FIB_HASH=y CONFIG_IP_PNP=y CONFIG_IP_PNP_DHCP=y CONFIG_IP_PNP_BOOTP=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y CONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic" CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y CONFIG_FIRMWARE_IN_KERNEL=y CONFIG_EXTRA_FIRMWARE=""
Re: Initial kernel command string (Was: Generating elf kernel ?)
Guillaume Dargaud wrote: > Thanks for helping about the elf issue, I got it running. The problem was > that > I wasn't using the proper file produced by make ! > > > Now I have a strange and probably simple problem that the Initial kernel > command string is incorrect. I want, and I have set in the .config: > CONFIG_CMDLINE="console=ttyUL0,115200 rw root=/dev/nfs ip=bootp" I think you should modify the bootargs on your dts. -- chosen { bootargs = "console=ttyS0 root=/dev/ram"; linux,stdout-path = "/p...@0/ser...@83e0"; } ; > > But when my kernel boots it uses: > console=ttyUL0 root=/dev/ram > > I can check: > strings arch/powerpc/boot/simpleImage.virtex405-ml405.elf | grep console > Vconsole=ttyUL0 root=/dev/ram > > > Also my previous kernel would wait for 2 seconds at the beginning to allow me > to change the initial command string via the serial port, but now it just > runs > right through. How can I enable this option ? It's possible on PowerPC kernel :) You can take a look at the file, arch/powerpc/boot/main.c. -- static void prep_cmdline(void *chosen) { if (cmdline[0] == '\0') getprop(chosen, "bootargs", cmdline, COMMAND_LINE_SIZE-1); printf("\n\rLinux/PowerPC load: %s", cmdline); /* If possible, edit the command line */ if (console_ops.edit_cmdline) console_ops.edit_cmdline(cmdline, COMMAND_LINE_SIZE); printf("\n\r"); ... So you have to define one function, console_ops.edit_cmdline --> serial_edit_cmdline. Or you can try bind this to your boot console ops directly. Please refer to the file, arch/powerpc/boot/serial.c. Cheers! Tiejun > > On the plus side it boots in .5 seconds ! > > Here's my .config: > CONFIG_40x=y > CONFIG_4xx=y > CONFIG_PPC_MMU_NOHASH=y > CONFIG_PPC_MMU_NOHASH_32=y > CONFIG_NOT_COHERENT_CACHE=y > CONFIG_PPC32=y > CONFIG_WORD_SIZE=32 > CONFIG_MMU=y > CONFIG_GENERIC_CMOS_UPDATE=y > CONFIG_GENERIC_TIME=y > CONFIG_GENERIC_TIME_VSYSCALL=y > CONFIG_GENERIC_CLOCKEVENTS=y > CONFIG_GENERIC_HARDIRQS=y > CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y > CONFIG_IRQ_PER_CPU=y > CONFIG_NR_IRQS=512 > CONFIG_STACKTRACE_SUPPORT=y > CONFIG_HAVE_LATENCYTOP_SUPPORT=y > CONFIG_TRACE_IRQFLAGS_SUPPORT=y > CONFIG_LOCKDEP_SUPPORT=y > CONFIG_RWSEM_XCHGADD_ALGORITHM=y > CONFIG_ARCH_HAS_ILOG2_U32=y > CONFIG_GENERIC_HWEIGHT=y > CONFIG_GENERIC_FIND_NEXT_BIT=y > CONFIG_GENERIC_GPIO=y > CONFIG_PPC=y > CONFIG_EARLY_PRINTK=y > CONFIG_GENERIC_NVRAM=y > CONFIG_SCHED_OMIT_FRAME_POINTER=y > CONFIG_ARCH_MAY_HAVE_PC_FDC=y > CONFIG_PPC_OF=y > CONFIG_OF=y > CONFIG_PPC_UDBG_16550=y > CONFIG_AUDIT_ARCH=y > CONFIG_GENERIC_BUG=y > CONFIG_DTC=y > CONFIG_DEFAULT_UIMAGE=y > CONFIG_ARCH_HIBERNATION_POSSIBLE=y > CONFIG_PPC_DCR_NATIVE=y > CONFIG_PPC_DCR_MMIO=y > CONFIG_PPC_DCR=y > CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y > CONFIG_PPC_ADV_DEBUG_REGS=y > CONFIG_PPC_ADV_DEBUG_IACS=2 > CONFIG_PPC_ADV_DEBUG_DACS=2 > CONFIG_PPC_ADV_DEBUG_DVCS=0 > CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" > CONFIG_CONSTRUCTORS=y > CONFIG_EXPERIMENTAL=y > CONFIG_BROKEN_ON_SMP=y > CONFIG_INIT_ENV_ARG_LIMIT=32 > CONFIG_LOCALVERSION="" > CONFIG_TREE_RCU=y > CONFIG_RCU_FANOUT=32 > CONFIG_IKCONFIG=y > CONFIG_IKCONFIG_PROC=y > CONFIG_LOG_BUF_SHIFT=14 > CONFIG_NAMESPACES=y > CONFIG_CC_OPTIMIZE_FOR_SIZE=y > CONFIG_SYSCTL=y > CONFIG_ANON_INODES=y > CONFIG_SYSCTL_SYSCALL=y > CONFIG_KALLSYMS=y > CONFIG_HOTPLUG=y > CONFIG_PRINTK=y > CONFIG_BUG=y > CONFIG_ELF_CORE=y > CONFIG_BASE_FULL=y > CONFIG_FUTEX=y > CONFIG_EPOLL=y > CONFIG_SIGNALFD=y > CONFIG_TIMERFD=y > CONFIG_EVENTFD=y > CONFIG_SHMEM=y > CONFIG_AIO=y > CONFIG_HAVE_PERF_EVENTS=y > CONFIG_PERF_EVENTS=y > CONFIG_VM_EVENT_COUNTERS=y > CONFIG_COMPAT_BRK=y > CONFIG_SLAB=y > CONFIG_HAVE_OPROFILE=y > CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y > CONFIG_HAVE_IOREMAP_PROT=y > CONFIG_HAVE_KPROBES=y > CONFIG_HAVE_KRETPROBES=y > CONFIG_HAVE_ARCH_TRACEHOOK=y > CONFIG_HAVE_DMA_ATTRS=y > CONFIG_HAVE_DMA_API_DEBUG=y > CONFIG_SLABINFO=y > CONFIG_RT_MUTEXES=y > CONFIG_BASE_SMALL=0 > CONFIG_MODULES=y > CONFIG_MODULE_UNLOAD=y > CONFIG_MODULE_FORCE_UNLOAD=y > CONFIG_BLOCK=y > CONFIG_IOSCHED_NOOP=y > CONFIG_IOSCHED_DEADLINE=y > CONFIG_IOSCHED_CFQ=y > CONFIG_DEFAULT_CFQ=y > CONFIG_DEFAULT_IOSCHED="cfq" > CONFIG_INLINE_SPIN_UNLOCK=y > CONFIG_INLINE_SPIN_UNLOCK_IRQ=y > CONFIG_INLINE_READ_UNLOCK=y > CONFIG_INLINE_READ_UNLOCK_IRQ=y > CONFIG_INLINE_WRITE_UNLOCK=y > CONFIG_INLINE_WRITE_UNLOCK_IRQ=y > CONFIG_PPC4xx_GPIO=y > CONFIG_XILINX_VIRTEX=y > CONFIG_XILINX_VIRTEX_GENERIC_BOARD=y > CONFIG_PPC40x_SIMPLE=y > CONFIG_XILINX_VIRTEX_II_PRO=y > CONFIG_XILINX_VIRTEX_4_FX=y > CONFIG_IBM405_ERR77=y > CONFIG_IBM405_ERR51=y > CONFIG_SIMPLE_GPIO=y > CONFIG_GENERIC_CLOCKEVENTS_BUILD=y > CONFIG_HZ_250=y > CONFIG_HZ=250 > CONFIG_PREEMPT_VOLUNTARY=y > CONFIG_BINFMT_ELF=y > CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y > CONFIG_ARCH_HAS_WALK_MEMORY=y > CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y > CONFIG_SPARSE_I
Re: Generating elf kernel ?
On Fri, 17 Sep 2010 09:58:41 +0800 "tiejun.chen" wrote: > Scott Wood wrote: > > The guest OS *is* the same as native Linux, as far as TLB handling is > > concerned. > > Looks you means the TLB exception handler should be same between the native > and > the guest OS. Right? Yes. > Here I assume we're talking about e500mc since as far as I know for Freescale > only e500mc is designed to support virtual machine based on ISA 2.0.6. Yes, though there's nothing preventing virtualization on cores without category E.HV (KVM supports this) -- it's just slower. > I also know all TLB exceptions can direct to the guest OS when we enable > EPCR[DTLBGS|ITLBGS|DSIGS|ISIGS]. But some TLB instructions (i.e. tlbwe )are > the > privileged instructions. So the guest OS always trap into the hypervisor and > then the hypervisor should complete the real action with appropriate physical > address. Yes, of course. But that's not the point. I was just using it as a convenient example because that's what I've recently done ELF loading with... There's no reason U-Boot couldn't do the same if its ELF loader were updated to support device trees. Currently U-Boot loads bootwrapperless uImages to physical address zero. And FWIW, we have run setups where our hv loads Linux to true physical zero (with the hv living elsewhere), not just guest physical. -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH RFCv2 0/5] CARMA Board Support
On Wed, Sep 08, 2010 at 09:41:17AM -0700, Ira W. Snyder wrote: > Hello everyone, > > This is the second posting of these drivers, taking into account comments > from the RFCv1 post. Thanks to all that contributed. > Any comments on this series? I haven't heard anything for more than a week. Is there somebody else I should be CC'ing? Thanks, Ira ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 1/2] powerpc: export ppc_tb_freq so that modules can reference it
Export the global variable 'ppc_tb_freq', so that modules (like the Book-E watchdog driver) can use it. Signed-off-by: Timur Tabi --- This export is necessary for the Book-E watchdog driver to be compiled as a module. Since ppc_proc_freq is already exported, I figured it's okay for ppc_tb_freq to be exported as well. arch/powerpc/kernel/time.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 8533b3b..49aa130 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c @@ -163,6 +163,7 @@ static long timezone_offset; unsigned long ppc_proc_freq; EXPORT_SYMBOL(ppc_proc_freq); unsigned long ppc_tb_freq; +EXPORT_SYMBOL(ppc_tb_freq); static DEFINE_PER_CPU(u64, last_jiffy); -- 1.7.2.3 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 2/2] powerpc/watchdog: allow the e500 watchdog driver to be compiled as a module
Register the __init and __exit functions in the PowerPC e500 watchdog driver as module entry/exit functions, and modify the Kconfig entry. Add a .release method for the PowerPC e500 watchdog driver, so that the watchdog is disabled when the driver is closed. Loosely based on original code from Jiang Yutang . Signed-off-by: Timur Tabi --- This patch requires: powerpc: export ppc_tb_freq so that modules can reference it drivers/watchdog/Kconfig |5 - drivers/watchdog/booke_wdt.c | 39 +-- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 24efd8e..d9cf5a9 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -957,9 +957,12 @@ config PIKA_WDT the Warp platform. config BOOKE_WDT - bool "PowerPC Book-E Watchdog Timer" + tristate "PowerPC Book-E Watchdog Timer" depends on BOOKE || 4xx ---help--- + Watchdog driver for PowerPC e500 chips, such as the Freescale + MPC85xx SOCs. + Please see Documentation/watchdog/watchdog-api.txt for more information. diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c index 3d49671..a989998 100644 --- a/drivers/watchdog/booke_wdt.c +++ b/drivers/watchdog/booke_wdt.c @@ -4,7 +4,7 @@ * Author: Matthew McClintock * Maintainer: Kumar Gala * - * Copyright 2005, 2008 Freescale Semiconductor Inc. + * Copyright 2005, 2008, 2010 Freescale Semiconductor Inc. * * 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 @@ -114,6 +114,27 @@ static void __booke_wdt_enable(void *data) mtspr(SPRN_TCR, val); } +/** + * booke_wdt_disable - disable the watchdog on the given CPU + * + * This function is called on each CPU. It disables the watchdog on that CPU. + * + * TCR[WRC] cannot be changed once it has been set to non-zero, but we can + * effectively disable the watchdog by setting its period to the maximum value. + */ +static void __booke_wdt_disable(void *data) +{ + u32 val; + + val = mfspr(SPRN_TCR); + val &= ~(TCR_WIE | WDTP_MASK); + mtspr(SPRN_TCR, val); + + /* clear status to make sure nothing is pending */ + __booke_wdt_ping(NULL); + +} + static ssize_t booke_wdt_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { @@ -193,12 +214,21 @@ static int booke_wdt_open(struct inode *inode, struct file *file) return nonseekable_open(inode, file); } +static int booke_wdt_release(struct inode *inode, struct file *file) +{ + on_each_cpu(__booke_wdt_disable, NULL, 0); + booke_wdt_enabled = 0; + + return 0; +} + static const struct file_operations booke_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = booke_wdt_write, .unlocked_ioctl = booke_wdt_ioctl, .open = booke_wdt_open, + .release = booke_wdt_release, }; static struct miscdevice booke_wdt_miscdev = { @@ -237,4 +267,9 @@ static int __init booke_wdt_init(void) return ret; } -device_initcall(booke_wdt_init); + +module_init(booke_wdt_init); +module_exit(booke_wdt_exit); + +MODULE_DESCRIPTION("PowerPC Book-E watchdog driver"); +MODULE_LICENSE("GPL"); -- 1.7.2.3 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 2/2] powerpc/watchdog: allow the e500 watchdog driver to be compiled as a module
On Fri, Sep 17, 2010 at 6:53 PM, Timur Tabi wrote: > Register the __init and __exit functions in the PowerPC e500 watchdog driver > as module entry/exit functions, and modify the Kconfig entry. > > Add a .release method for the PowerPC e500 watchdog driver, so that the > watchdog is disabled when the driver is closed. This is used for more than just e500. > > Loosely based on original code from Jiang Yutang . > > Signed-off-by: Timur Tabi > --- > > This patch requires: > > powerpc: export ppc_tb_freq so that modules can reference it > > drivers/watchdog/Kconfig | 5 - > drivers/watchdog/booke_wdt.c | 39 +-- > 2 files changed, 41 insertions(+), 3 deletions(-) > > diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig > index 24efd8e..d9cf5a9 100644 > --- a/drivers/watchdog/Kconfig > +++ b/drivers/watchdog/Kconfig > @@ -957,9 +957,12 @@ config PIKA_WDT > the Warp platform. > > config BOOKE_WDT > - bool "PowerPC Book-E Watchdog Timer" > + tristate "PowerPC Book-E Watchdog Timer" > depends on BOOKE || 4xx > ---help--- > + Watchdog driver for PowerPC e500 chips, such as the Freescale > + MPC85xx SOCs. > + Again, used for more than e500. That || 4xx in the depends statement right above your addition isn't there for fun :). josh ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/2] powerpc: export ppc_tb_freq so that modules can reference it
On Fri, Sep 17, 2010 at 6:53 PM, Timur Tabi wrote: > Export the global variable 'ppc_tb_freq', so that modules (like the Book-E > watchdog driver) can use it. > > Signed-off-by: Timur Tabi > --- > > This export is necessary for the Book-E watchdog driver to be compiled as a > module. Since ppc_proc_freq is already exported, I figured it's okay for > ppc_tb_freq to be exported as well. > > arch/powerpc/kernel/time.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c > index 8533b3b..49aa130 100644 > --- a/arch/powerpc/kernel/time.c > +++ b/arch/powerpc/kernel/time.c > @@ -163,6 +163,7 @@ static long timezone_offset; > unsigned long ppc_proc_freq; > EXPORT_SYMBOL(ppc_proc_freq); > unsigned long ppc_tb_freq; > +EXPORT_SYMBOL(ppc_tb_freq); EXPORT_SYMBOL_GPL probably, no? josh ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/2] powerpc: export ppc_tb_freq so that modules can reference it
On Fri, Sep 17, 2010 at 7:38 PM, Josh Boyer wrote: >> unsigned long ppc_proc_freq; >> EXPORT_SYMBOL(ppc_proc_freq); >> unsigned long ppc_tb_freq; >> +EXPORT_SYMBOL(ppc_tb_freq); > > EXPORT_SYMBOL_GPL probably, no? I don't see any reason to limit it to GPL drivers. Not only that, but then we'll have this: EXPORT_SYMBOL(ppc_proc_freq); EXPORT_SYMBOL_GPL(ppc_tb_freq); That just looks dumb. -- Timur Tabi Linux kernel developer at Freescale ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 2/2] PPC4xx: Merge xor.h and dma.h into onefile ppc440spe-dma.h
From: Tirumala Marri This patch combines drivers/dma/ppc4xx/xor.h and driver/dma/dma/ppc4xx/dma.h into drivers/dma/ppc4xx/ppx440spe-dma.h . Signed-off-by: Tirumala R Marri --- drivers/dma/ppc4xx/dma.h | 223 - drivers/dma/ppc4xx/ppc440spe-dma.h | 318 drivers/dma/ppc4xx/xor.h | 110 - 3 files changed, 318 insertions(+), 333 deletions(-) delete mode 100644 drivers/dma/ppc4xx/dma.h create mode 100644 drivers/dma/ppc4xx/ppc440spe-dma.h delete mode 100644 drivers/dma/ppc4xx/xor.h diff --git a/drivers/dma/ppc4xx/dma.h b/drivers/dma/ppc4xx/dma.h deleted file mode 100644 index bcde2df..000 --- a/drivers/dma/ppc4xx/dma.h +++ /dev/null @@ -1,223 +0,0 @@ -/* - * 440SPe's DMA engines support header file - * - * 2006-2009 (C) DENX Software Engineering. - * - * Author: Yuri Tikhonov - * - * This file is licensed under the term of the GNU General Public License - * version 2. The program licensed "as is" without any warranty of any - * kind, whether express or implied. - */ - -#ifndef_PPC440SPE_DMA_H -#define _PPC440SPE_DMA_H - -#include - -/* Number of elements in the array with statical CDBs */ -#defineMAX_STAT_DMA_CDBS 16 -/* Number of DMA engines available on the contoller */ -#define DMA_ENGINES_NUM2 - -/* Maximum h/w supported number of destinations */ -#define DMA_DEST_MAX_NUM 2 - -/* FIFO's params */ -#define DMA0_FIFO_SIZE 0x1000 -#define DMA1_FIFO_SIZE 0x1000 -#define DMA_FIFO_ENABLE(1<<12) - -/* DMA Configuration Register. Data Transfer Engine PLB Priority: */ -#define DMA_CFG_DXEPR_LP (0<<26) -#define DMA_CFG_DXEPR_HP (3<<26) -#define DMA_CFG_DXEPR_HHP (2<<26) -#define DMA_CFG_DXEPR_HHHP (1<<26) - -/* DMA Configuration Register. DMA FIFO Manager PLB Priority: */ -#define DMA_CFG_DFMPP_LP (0<<23) -#define DMA_CFG_DFMPP_HP (3<<23) -#define DMA_CFG_DFMPP_HHP (2<<23) -#define DMA_CFG_DFMPP_HHHP (1<<23) - -/* DMA Configuration Register. Force 64-byte Alignment */ -#define DMA_CFG_FALGN (1 << 19) - -/*UIC0:*/ -#define D0CPF_INT (1<<12) -#define D0CSF_INT (1<<11) -#define D1CPF_INT (1<<10) -#define D1CSF_INT (1<<9) -/*UIC1:*/ -#define DMAE_INT (1<<9) - -/* I2O IOP Interrupt Mask Register */ -#define I2O_IOPIM_P0SNE(1<<3) -#define I2O_IOPIM_P0EM (1<<5) -#define I2O_IOPIM_P1SNE(1<<6) -#define I2O_IOPIM_P1EM (1<<8) - -/* DMA CDB fields */ -#define DMA_CDB_MSK(0xF) -#define DMA_CDB_64B_ADDR (1<<2) -#define DMA_CDB_NO_INT (1<<3) -#define DMA_CDB_STATUS_MSK (0x3) -#define DMA_CDB_ADDR_MSK (0xFFF0) - -/* DMA CDB OpCodes */ -#define DMA_CDB_OPC_NO_OP (0x00) -#define DMA_CDB_OPC_MV_SG1_SG2 (0x01) -#define DMA_CDB_OPC_MULTICAST (0x05) -#define DMA_CDB_OPC_DFILL128 (0x24) -#define DMA_CDB_OPC_DCHECK128 (0x23) - -#define DMA_CUED_XOR_BASE (0x1000) -#define DMA_CUED_XOR_HB(0x0008) - -#ifdef CONFIG_440SP -#define DMA_CUED_MULT1_OFF 0 -#define DMA_CUED_MULT2_OFF 8 -#define DMA_CUED_MULT3_OFF 16 -#define DMA_CUED_REGION_OFF24 -#define DMA_CUED_XOR_WIN_MSK (0xFC00) -#else -#define DMA_CUED_MULT1_OFF 2 -#define DMA_CUED_MULT2_OFF 10 -#define DMA_CUED_MULT3_OFF 18 -#define DMA_CUED_REGION_OFF26 -#define DMA_CUED_XOR_WIN_MSK (0xF000) -#endif - -#define DMA_CUED_REGION_MSK0x3 -#define DMA_RXOR1230x0 -#define DMA_RXOR1240x1 -#define DMA_RXOR1250x2 -#define DMA_RXOR12 0x3 - -/* S/G addresses */ -#define DMA_CDB_SG_SRC 1 -#define DMA_CDB_SG_DST12 -#define DMA_CDB_SG_DST23 - -/* - * DMAx engines Command Descriptor Block Type - */ -struct dma_cdb { - /* -* Basic CDB structure (Table 20-17, p.499, 440spe_um_1_22.pdf) -*/ - u8 pad0[2];/* reserved */ - u8 attr; /* attributes */ - u8 opc;/* opcode */ - u32 sg1u; /* upper SG1 address */ - u32 sg1l; /* lower SG1 address */ - u32 cnt;/* SG count, 3B used */ - u32 sg2u; /* upper SG2 address */ - u32 sg2l; /* lower SG2 address */ - u32 sg3u; /* upper SG3 address */ - u32 sg3l; /* lower SG3 address */ -}; - -/* - * DMAx hardware registers (p.515 in 440SPe UM 1.22) - */ -struct dma_regs { - u32 cpfpl; - u32 cpfph; - u32 csfpl; - u32 csfph; - u32 dsts; - u32 cfg; - u8 pad0[0x8]; - u16 cpfhp; - u16 cpftp; - u16 csfhp; - u16 csftp; - u8 pad1[0x8]; - u32 acpl; - u32 acph; - u32
Re: [PATCH 1/2] powerpc: export ppc_tb_freq so that modules can reference it
On Fri, 2010-09-17 at 20:20 -0500, Timur Tabi wrote: > I don't see any reason to limit it to GPL drivers. Not only that, but > then we'll have this: I do > EXPORT_SYMBOL(ppc_proc_freq); > EXPORT_SYMBOL_GPL(ppc_tb_freq); > > That just looks dumb. Right, so send a patch to fix the first one too :-) Cheers, Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev