···197197 depends on !XIP_KERNEL && MMU198198 depends on !ARCH_REALVIEW || !SPARSEMEM199199 help200200- Patch phys-to-virt translation functions at runtime according to201201- the position of the kernel in system memory.200200+ Patch phys-to-virt and virt-to-phys translation functions at201201+ boot and module load time according to the position of the202202+ kernel in system memory.202203203203- This can only be used with non-XIP with MMU kernels where204204- the base of physical memory is at a 16MB boundary.204204+ This can only be used with non-XIP MMU kernels where the base205205+ of physical memory is at a 16MB boundary, or theoretically 64K206206+ for the MSM machine class.205207206208config ARM_PATCH_PHYS_VIRT_16BIT207209 def_bool y208210 depends on ARM_PATCH_PHYS_VIRT && ARCH_MSM211211+ help212212+ This option extends the physical to virtual translation patching213213+ to allow physical memory down to a theoretical minimum of 64K214214+ boundaries.209215210216source "init/Kconfig"211217···555549 help556550 Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based557551 System-on-Chip devices.558558-559559-config ARCH_NS9XXX560560- bool "NetSilicon NS9xxx"561561- select CPU_ARM926T562562- select GENERIC_GPIO563563- select GENERIC_CLOCKEVENTS564564- select HAVE_CLK565565- help566566- Say Y here if you intend to run this kernel on a NetSilicon NS9xxx567567- System.568568-569569- <http://www.digi.com/products/microprocessors/index.jsp>570552571553config ARCH_W90X900572554 bool "Nuvoton W90X900 CPU"···948954source "arch/arm/mach-nomadik/Kconfig"949955source "arch/arm/plat-nomadik/Kconfig"950956951951-source "arch/arm/mach-ns9xxx/Kconfig"952952-953957source "arch/arm/mach-nuc93x/Kconfig"954958955959source "arch/arm/plat-omap/Kconfig"···13131321source "kernel/time/Kconfig"1314132213151323config SMP13161316- bool "Symmetric Multi-Processing (EXPERIMENTAL)"13171317- depends on EXPERIMENTAL13241324+ bool "Symmetric Multi-Processing"13181325 depends on CPU_V6K || CPU_V713191326 depends on GENERIC_CLOCKEVENTS13201327 depends on REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP || \···15151524 def_bool ARCH_SPARSEMEM_ENABLE1516152515171526config HIGHMEM15181518- bool "High Memory Support (EXPERIMENTAL)"15191519- depends on MMU && EXPERIMENTAL15271527+ bool "High Memory Support"15281528+ depends on MMU15201529 help15211530 The address space of ARM processors is only 4 Gigabytes large15221531 and it has to accommodate user address space, kernel address···17361745 time by entering them here. As a minimum, you should specify the17371746 memory size and the root device (e.g., mem=64M root=/dev/nfs).1738174717481748+choice17491749+ prompt "Kernel command line type" if CMDLINE != ""17501750+ default CMDLINE_FROM_BOOTLOADER17511751+17521752+config CMDLINE_FROM_BOOTLOADER17531753+ bool "Use bootloader kernel arguments if available"17541754+ help17551755+ Uses the command-line options passed by the boot loader. If17561756+ the boot loader doesn't provide any, the default kernel command17571757+ string provided in CMDLINE will be used.17581758+17591759+config CMDLINE_EXTEND17601760+ bool "Extend bootloader kernel arguments"17611761+ help17621762+ The command-line arguments provided by the boot loader will be17631763+ appended to the default kernel command string.17641764+17391765config CMDLINE_FORCE17401766 bool "Always use the default kernel command string"17411741- depends on CMDLINE != ""17421767 help17431768 Always use the default kernel command string, even if the boot17441769 loader passes other arguments to the kernel.17451770 This is useful if you cannot or don't want to change the17461771 command-line options your boot loader passes to the kernel.17471747-17481748- If unsure, say N.17721772+endchoice1749177317501774config XIP_KERNEL17511775 bool "Kernel Execute-In-Place from ROM"···20192013source "kernel/power/Kconfig"2020201420212015config ARCH_SUSPEND_POSSIBLE20222022- depends on !ARCH_S5P64X0 && !ARCH_S5P644220162016+ depends on !ARCH_S5P64X0 && !ARCH_S5P6442 && !ARCH_S5PC10020232017 depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \20242018 CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE20252019 def_bool y
···459459 orr r1, r1, #3 << 10460460 add r2, r3, #163844614611: cmp r1, r9 @ if virt > start of RAM462462+#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH463463+ orrhs r1, r1, #0x08 @ set cacheable464464+#else462465 orrhs r1, r1, #0x0c @ set cacheable, bufferable466466+#endif463467 cmp r1, r10 @ if virt > end of RAM464468 bichs r1, r1, #0x0c @ clear cacheable, bufferable465469 str r1, [r0], #4 @ 1:1 mapping···487483 str r1, [r0]488484 mov pc, lr489485ENDPROC(__setup_mmu)486486+487487+__arm926ejs_mmu_cache_on:488488+#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH489489+ mov r0, #4 @ put dcache in WT mode490490+ mcr p15, 7, r0, c15, c0, 0491491+#endif490492491493__armv4_mmu_cache_on:492494 mov r12, lr···674664 W(b) __armv4_mpu_cache_on675665 W(b) __armv4_mpu_cache_off676666 W(b) __armv4_mpu_cache_flush667667+668668+ .word 0x41069260 @ ARM926EJ-S (v5TEJ)669669+ .word 0xff0ffff0670670+ b __arm926ejs_mmu_cache_on671671+ b __armv4_mmu_cache_off672672+ b __armv5tej_mmu_cache_flush677673678674 .word 0x00007000 @ ARM7 IDs679675 .word 0x0000f000
-56
arch/arm/configs/ns9xxx_defconfig
···11-CONFIG_IKCONFIG=y22-CONFIG_IKCONFIG_PROC=y33-CONFIG_BLK_DEV_INITRD=y44-CONFIG_MODULES=y55-CONFIG_MODULE_UNLOAD=y66-# CONFIG_IOSCHED_DEADLINE is not set77-# CONFIG_IOSCHED_CFQ is not set88-CONFIG_ARCH_NS9XXX=y99-CONFIG_MACH_CC9P9360DEV=y1010-CONFIG_MACH_CC9P9360JS=y1111-CONFIG_NO_HZ=y1212-CONFIG_HIGH_RES_TIMERS=y1313-CONFIG_FPE_NWFPE=y1414-CONFIG_NET=y1515-CONFIG_PACKET=m1616-CONFIG_INET=y1717-CONFIG_IP_PNP=y1818-CONFIG_SYN_COOKIES=y1919-CONFIG_MTD=m2020-CONFIG_MTD_CONCAT=m2121-CONFIG_MTD_CHAR=m2222-CONFIG_MTD_BLOCK=m2323-CONFIG_MTD_CFI=m2424-CONFIG_MTD_JEDECPROBE=m2525-CONFIG_MTD_CFI_AMDSTD=m2626-CONFIG_MTD_PHYSMAP=m2727-CONFIG_BLK_DEV_LOOP=m2828-CONFIG_NETDEVICES=y2929-CONFIG_NET_ETHERNET=y3030-# CONFIG_SERIO_SERPORT is not set3131-CONFIG_SERIAL_8250=y3232-CONFIG_SERIAL_8250_CONSOLE=y3333-# CONFIG_LEGACY_PTYS is not set3434-# CONFIG_HW_RANDOM is not set3535-CONFIG_I2C=m3636-CONFIG_I2C_GPIO=m3737-# CONFIG_HWMON is not set3838-# CONFIG_VGA_CONSOLE is not set3939-# CONFIG_USB_SUPPORT is not set4040-CONFIG_NEW_LEDS=y4141-CONFIG_LEDS_CLASS=m4242-CONFIG_LEDS_GPIO=m4343-CONFIG_LEDS_TRIGGERS=y4444-CONFIG_LEDS_TRIGGER_TIMER=m4545-CONFIG_LEDS_TRIGGER_HEARTBEAT=m4646-CONFIG_RTC_CLASS=m4747-CONFIG_EXT2_FS=m4848-CONFIG_TMPFS=y4949-CONFIG_JFFS2_FS=m5050-CONFIG_NFS_FS=y5151-CONFIG_ROOT_NFS=y5252-# CONFIG_ENABLE_MUST_CHECK is not set5353-CONFIG_DEBUG_KERNEL=y5454-CONFIG_DEBUG_INFO=y5555-CONFIG_DEBUG_USER=y5656-CONFIG_DEBUG_ERRORS=y
-51
arch/arm/configs/spear300_defconfig
···11-CONFIG_EXPERIMENTAL=y22-CONFIG_SYSVIPC=y33-CONFIG_BSD_PROCESS_ACCT=y44-CONFIG_BLK_DEV_INITRD=y55-CONFIG_KALLSYMS_EXTRA_PASS=y66-CONFIG_MODULES=y77-CONFIG_MODULE_UNLOAD=y88-CONFIG_MODVERSIONS=y99-CONFIG_PLAT_SPEAR=y1010-CONFIG_BINFMT_MISC=y1111-CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"1212-CONFIG_BLK_DEV_RAM=y1313-CONFIG_BLK_DEV_RAM_SIZE=163841414-CONFIG_INPUT_FF_MEMLESS=y1515-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set1616-# CONFIG_INPUT_KEYBOARD is not set1717-# CONFIG_INPUT_MOUSE is not set1818-CONFIG_SERIAL_AMBA_PL011=y1919-CONFIG_SERIAL_AMBA_PL011_CONSOLE=y2020-# CONFIG_LEGACY_PTYS is not set2121-# CONFIG_HW_RANDOM is not set2222-CONFIG_RAW_DRIVER=y2323-CONFIG_MAX_RAW_DEVS=81922424-CONFIG_GPIO_SYSFS=y2525-CONFIG_GPIO_PL061=y2626-# CONFIG_HWMON is not set2727-# CONFIG_VGA_CONSOLE is not set2828-# CONFIG_HID_SUPPORT is not set2929-# CONFIG_USB_SUPPORT is not set3030-CONFIG_EXT2_FS=y3131-CONFIG_EXT2_FS_XATTR=y3232-CONFIG_EXT2_FS_SECURITY=y3333-CONFIG_EXT3_FS=y3434-CONFIG_EXT3_FS_SECURITY=y3535-CONFIG_AUTOFS4_FS=m3636-CONFIG_MSDOS_FS=m3737-CONFIG_VFAT_FS=m3838-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"3939-CONFIG_TMPFS=y4040-CONFIG_PARTITION_ADVANCED=y4141-CONFIG_NLS=y4242-CONFIG_NLS_DEFAULT="utf8"4343-CONFIG_NLS_CODEPAGE_437=y4444-CONFIG_NLS_ASCII=m4545-CONFIG_MAGIC_SYSRQ=y4646-CONFIG_DEBUG_FS=y4747-CONFIG_DEBUG_KERNEL=y4848-CONFIG_DEBUG_SPINLOCK=y4949-CONFIG_DEBUG_SPINLOCK_SLEEP=y5050-CONFIG_DEBUG_INFO=y5151-# CONFIG_CRC32 is not set
···77CONFIG_MODULE_UNLOAD=y88CONFIG_MODVERSIONS=y99CONFIG_PLAT_SPEAR=y1010-CONFIG_MACH_SPEAR310=y1010+CONFIG_BOARD_SPEAR300_EVB=y1111+CONFIG_BOARD_SPEAR310_EVB=y1212+CONFIG_BOARD_SPEAR320_EVB=y1113CONFIG_BINFMT_MISC=y1214CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"1315CONFIG_BLK_DEV_RAM=y···2725CONFIG_GPIO_SYSFS=y2826CONFIG_GPIO_PL061=y2927# CONFIG_HWMON is not set3030-# CONFIG_VGA_CONSOLE is not set3128# CONFIG_HID_SUPPORT is not set3229# CONFIG_USB_SUPPORT is not set3330CONFIG_EXT2_FS=y
-52
arch/arm/configs/spear320_defconfig
···11-CONFIG_EXPERIMENTAL=y22-CONFIG_SYSVIPC=y33-CONFIG_BSD_PROCESS_ACCT=y44-CONFIG_BLK_DEV_INITRD=y55-CONFIG_KALLSYMS_EXTRA_PASS=y66-CONFIG_MODULES=y77-CONFIG_MODULE_UNLOAD=y88-CONFIG_MODVERSIONS=y99-CONFIG_PLAT_SPEAR=y1010-CONFIG_MACH_SPEAR320=y1111-CONFIG_BINFMT_MISC=y1212-CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"1313-CONFIG_BLK_DEV_RAM=y1414-CONFIG_BLK_DEV_RAM_SIZE=163841515-CONFIG_INPUT_FF_MEMLESS=y1616-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set1717-# CONFIG_INPUT_KEYBOARD is not set1818-# CONFIG_INPUT_MOUSE is not set1919-CONFIG_SERIAL_AMBA_PL011=y2020-CONFIG_SERIAL_AMBA_PL011_CONSOLE=y2121-# CONFIG_LEGACY_PTYS is not set2222-# CONFIG_HW_RANDOM is not set2323-CONFIG_RAW_DRIVER=y2424-CONFIG_MAX_RAW_DEVS=81922525-CONFIG_GPIO_SYSFS=y2626-CONFIG_GPIO_PL061=y2727-# CONFIG_HWMON is not set2828-# CONFIG_VGA_CONSOLE is not set2929-# CONFIG_HID_SUPPORT is not set3030-# CONFIG_USB_SUPPORT is not set3131-CONFIG_EXT2_FS=y3232-CONFIG_EXT2_FS_XATTR=y3333-CONFIG_EXT2_FS_SECURITY=y3434-CONFIG_EXT3_FS=y3535-CONFIG_EXT3_FS_SECURITY=y3636-CONFIG_AUTOFS4_FS=m3737-CONFIG_MSDOS_FS=m3838-CONFIG_VFAT_FS=m3939-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"4040-CONFIG_TMPFS=y4141-CONFIG_PARTITION_ADVANCED=y4242-CONFIG_NLS=y4343-CONFIG_NLS_DEFAULT="utf8"4444-CONFIG_NLS_CODEPAGE_437=y4545-CONFIG_NLS_ASCII=m4646-CONFIG_MAGIC_SYSRQ=y4747-CONFIG_DEBUG_FS=y4848-CONFIG_DEBUG_KERNEL=y4949-CONFIG_DEBUG_SPINLOCK=y5050-CONFIG_DEBUG_SPINLOCK_SLEEP=y5151-CONFIG_DEBUG_INFO=y5252-# CONFIG_CRC32 is not set
···88CONFIG_MODVERSIONS=y99CONFIG_PLAT_SPEAR=y1010CONFIG_ARCH_SPEAR6XX=y1111+CONFIG_BOARD_SPEAR600_EVB=y1112CONFIG_BINFMT_MISC=y1213CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"1314CONFIG_BLK_DEV_RAM=y···2322CONFIG_GPIO_SYSFS=y2423CONFIG_GPIO_PL061=y2524# CONFIG_HWMON is not set2626-# CONFIG_VGA_CONSOLE is not set2725# CONFIG_HID_SUPPORT is not set2826# CONFIG_USB_SUPPORT is not set2927CONFIG_EXT2_FS=y
+1
arch/arm/include/asm/elf.h
···108108int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs);109109#define ELF_CORE_COPY_TASK_REGS dump_task_regs110110111111+#define CORE_DUMP_USE_REGSET111112#define ELF_EXEC_PAGESIZE 4096112113113114/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
···128128#define ARM_r0 uregs[0]129129#define ARM_ORIG_r0 uregs[17]130130131131+/*132132+ * The size of the user-visible VFP state as seen by PTRACE_GET/SETVFPREGS133133+ * and core dumps.134134+ */135135+#define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ )136136+131137#ifdef __KERNEL__132138133139#define user_mode(regs) \
+2
arch/arm/include/asm/spinlock.h
···55#error SMP not supported on pre-ARMv6 CPUs66#endif7788+#include <asm/processor.h>99+810/*911 * sev and wfe are ARMv6K extensions. Uniprocessor ARMv6 may not have the K1012 * extensions, so when running on UP, we have to patch these instructions away.
-5
arch/arm/kernel/perf_event.c
···560560 event->destroy = hw_perf_event_destroy;561561562562 if (!atomic_inc_not_zero(&active_events)) {563563- if (atomic_read(&active_events) > armpmu->num_events) {564564- atomic_dec(&active_events);565565- return -ENOSPC;566566- }567567-568563 mutex_lock(&pmu_reserve_mutex);569564 if (atomic_read(&active_events) == 0) {570565 err = armpmu_reserve_hardware();
+239-109
arch/arm/kernel/ptrace.c
···2121#include <linux/uaccess.h>2222#include <linux/perf_event.h>2323#include <linux/hw_breakpoint.h>2424+#include <linux/regset.h>24252526#include <asm/pgtable.h>2627#include <asm/system.h>···309308 return put_user_reg(tsk, off >> 2, val);310309}311310312312-/*313313- * Get all user integer registers.314314- */315315-static int ptrace_getregs(struct task_struct *tsk, void __user *uregs)316316-{317317- struct pt_regs *regs = task_pt_regs(tsk);318318-319319- return copy_to_user(uregs, regs, sizeof(struct pt_regs)) ? -EFAULT : 0;320320-}321321-322322-/*323323- * Set all user integer registers.324324- */325325-static int ptrace_setregs(struct task_struct *tsk, void __user *uregs)326326-{327327- struct pt_regs newregs;328328- int ret;329329-330330- ret = -EFAULT;331331- if (copy_from_user(&newregs, uregs, sizeof(struct pt_regs)) == 0) {332332- struct pt_regs *regs = task_pt_regs(tsk);333333-334334- ret = -EINVAL;335335- if (valid_user_regs(&newregs)) {336336- *regs = newregs;337337- ret = 0;338338- }339339- }340340-341341- return ret;342342-}343343-344344-/*345345- * Get the child FPU state.346346- */347347-static int ptrace_getfpregs(struct task_struct *tsk, void __user *ufp)348348-{349349- return copy_to_user(ufp, &task_thread_info(tsk)->fpstate,350350- sizeof(struct user_fp)) ? -EFAULT : 0;351351-}352352-353353-/*354354- * Set the child FPU state.355355- */356356-static int ptrace_setfpregs(struct task_struct *tsk, void __user *ufp)357357-{358358- struct thread_info *thread = task_thread_info(tsk);359359- thread->used_cp[1] = thread->used_cp[2] = 1;360360- return copy_from_user(&thread->fpstate, ufp,361361- sizeof(struct user_fp)) ? -EFAULT : 0;362362-}363363-364311#ifdef CONFIG_IWMMXT365312366313/*···364415 crunch_task_release(thread); /* force a reload */365416 return copy_from_user(&thread->crunchstate, ufp, CRUNCH_SIZE)366417 ? -EFAULT : 0;367367-}368368-#endif369369-370370-#ifdef CONFIG_VFP371371-/*372372- * Get the child VFP state.373373- */374374-static int ptrace_getvfpregs(struct task_struct *tsk, void __user *data)375375-{376376- struct thread_info *thread = task_thread_info(tsk);377377- union vfp_state *vfp = &thread->vfpstate;378378- struct user_vfp __user *ufp = data;379379-380380- vfp_sync_hwstate(thread);381381-382382- /* copy the floating point registers */383383- if (copy_to_user(&ufp->fpregs, &vfp->hard.fpregs,384384- sizeof(vfp->hard.fpregs)))385385- return -EFAULT;386386-387387- /* copy the status and control register */388388- if (put_user(vfp->hard.fpscr, &ufp->fpscr))389389- return -EFAULT;390390-391391- return 0;392392-}393393-394394-/*395395- * Set the child VFP state.396396- */397397-static int ptrace_setvfpregs(struct task_struct *tsk, void __user *data)398398-{399399- struct thread_info *thread = task_thread_info(tsk);400400- union vfp_state *vfp = &thread->vfpstate;401401- struct user_vfp __user *ufp = data;402402-403403- vfp_sync_hwstate(thread);404404-405405- /* copy the floating point registers */406406- if (copy_from_user(&vfp->hard.fpregs, &ufp->fpregs,407407- sizeof(vfp->hard.fpregs)))408408- return -EFAULT;409409-410410- /* copy the status and control register */411411- if (get_user(vfp->hard.fpscr, &ufp->fpscr))412412- return -EFAULT;413413-414414- vfp_flush_hwstate(thread);415415-416416- return 0;417418}418419#endif419420···593694}594695#endif595696697697+/* regset get/set implementations */698698+699699+static int gpr_get(struct task_struct *target,700700+ const struct user_regset *regset,701701+ unsigned int pos, unsigned int count,702702+ void *kbuf, void __user *ubuf)703703+{704704+ struct pt_regs *regs = task_pt_regs(target);705705+706706+ return user_regset_copyout(&pos, &count, &kbuf, &ubuf,707707+ regs,708708+ 0, sizeof(*regs));709709+}710710+711711+static int gpr_set(struct task_struct *target,712712+ const struct user_regset *regset,713713+ unsigned int pos, unsigned int count,714714+ const void *kbuf, const void __user *ubuf)715715+{716716+ int ret;717717+ struct pt_regs newregs;718718+719719+ ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,720720+ &newregs,721721+ 0, sizeof(newregs));722722+ if (ret)723723+ return ret;724724+725725+ if (!valid_user_regs(&newregs))726726+ return -EINVAL;727727+728728+ *task_pt_regs(target) = newregs;729729+ return 0;730730+}731731+732732+static int fpa_get(struct task_struct *target,733733+ const struct user_regset *regset,734734+ unsigned int pos, unsigned int count,735735+ void *kbuf, void __user *ubuf)736736+{737737+ return user_regset_copyout(&pos, &count, &kbuf, &ubuf,738738+ &task_thread_info(target)->fpstate,739739+ 0, sizeof(struct user_fp));740740+}741741+742742+static int fpa_set(struct task_struct *target,743743+ const struct user_regset *regset,744744+ unsigned int pos, unsigned int count,745745+ const void *kbuf, const void __user *ubuf)746746+{747747+ struct thread_info *thread = task_thread_info(target);748748+749749+ thread->used_cp[1] = thread->used_cp[2] = 1;750750+751751+ return user_regset_copyin(&pos, &count, &kbuf, &ubuf,752752+ &thread->fpstate,753753+ 0, sizeof(struct user_fp));754754+}755755+756756+#ifdef CONFIG_VFP757757+/*758758+ * VFP register get/set implementations.759759+ *760760+ * With respect to the kernel, struct user_fp is divided into three chunks:761761+ * 16 or 32 real VFP registers (d0-d15 or d0-31)762762+ * These are transferred to/from the real registers in the task's763763+ * vfp_hard_struct. The number of registers depends on the kernel764764+ * configuration.765765+ *766766+ * 16 or 0 fake VFP registers (d16-d31 or empty)767767+ * i.e., the user_vfp structure has space for 32 registers even if768768+ * the kernel doesn't have them all.769769+ *770770+ * vfp_get() reads this chunk as zero where applicable771771+ * vfp_set() ignores this chunk772772+ *773773+ * 1 word for the FPSCR774774+ *775775+ * The bounds-checking logic built into user_regset_copyout and friends776776+ * means that we can make a simple sequence of calls to map the relevant data777777+ * to/from the specified slice of the user regset structure.778778+ */779779+static int vfp_get(struct task_struct *target,780780+ const struct user_regset *regset,781781+ unsigned int pos, unsigned int count,782782+ void *kbuf, void __user *ubuf)783783+{784784+ int ret;785785+ struct thread_info *thread = task_thread_info(target);786786+ struct vfp_hard_struct const *vfp = &thread->vfpstate.hard;787787+ const size_t user_fpregs_offset = offsetof(struct user_vfp, fpregs);788788+ const size_t user_fpscr_offset = offsetof(struct user_vfp, fpscr);789789+790790+ vfp_sync_hwstate(thread);791791+792792+ ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,793793+ &vfp->fpregs,794794+ user_fpregs_offset,795795+ user_fpregs_offset + sizeof(vfp->fpregs));796796+ if (ret)797797+ return ret;798798+799799+ ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf,800800+ user_fpregs_offset + sizeof(vfp->fpregs),801801+ user_fpscr_offset);802802+ if (ret)803803+ return ret;804804+805805+ return user_regset_copyout(&pos, &count, &kbuf, &ubuf,806806+ &vfp->fpscr,807807+ user_fpscr_offset,808808+ user_fpscr_offset + sizeof(vfp->fpscr));809809+}810810+811811+/*812812+ * For vfp_set() a read-modify-write is done on the VFP registers,813813+ * in order to avoid writing back a half-modified set of registers on814814+ * failure.815815+ */816816+static int vfp_set(struct task_struct *target,817817+ const struct user_regset *regset,818818+ unsigned int pos, unsigned int count,819819+ const void *kbuf, const void __user *ubuf)820820+{821821+ int ret;822822+ struct thread_info *thread = task_thread_info(target);823823+ struct vfp_hard_struct new_vfp = thread->vfpstate.hard;824824+ const size_t user_fpregs_offset = offsetof(struct user_vfp, fpregs);825825+ const size_t user_fpscr_offset = offsetof(struct user_vfp, fpscr);826826+827827+ ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,828828+ &new_vfp.fpregs,829829+ user_fpregs_offset,830830+ user_fpregs_offset + sizeof(new_vfp.fpregs));831831+ if (ret)832832+ return ret;833833+834834+ ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,835835+ user_fpregs_offset + sizeof(new_vfp.fpregs),836836+ user_fpscr_offset);837837+ if (ret)838838+ return ret;839839+840840+ ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,841841+ &new_vfp.fpscr,842842+ user_fpscr_offset,843843+ user_fpscr_offset + sizeof(new_vfp.fpscr));844844+ if (ret)845845+ return ret;846846+847847+ vfp_sync_hwstate(thread);848848+ thread->vfpstate.hard = new_vfp;849849+ vfp_flush_hwstate(thread);850850+851851+ return 0;852852+}853853+#endif /* CONFIG_VFP */854854+855855+enum arm_regset {856856+ REGSET_GPR,857857+ REGSET_FPR,858858+#ifdef CONFIG_VFP859859+ REGSET_VFP,860860+#endif861861+};862862+863863+static const struct user_regset arm_regsets[] = {864864+ [REGSET_GPR] = {865865+ .core_note_type = NT_PRSTATUS,866866+ .n = ELF_NGREG,867867+ .size = sizeof(u32),868868+ .align = sizeof(u32),869869+ .get = gpr_get,870870+ .set = gpr_set871871+ },872872+ [REGSET_FPR] = {873873+ /*874874+ * For the FPA regs in fpstate, the real fields are a mixture875875+ * of sizes, so pretend that the registers are word-sized:876876+ */877877+ .core_note_type = NT_PRFPREG,878878+ .n = sizeof(struct user_fp) / sizeof(u32),879879+ .size = sizeof(u32),880880+ .align = sizeof(u32),881881+ .get = fpa_get,882882+ .set = fpa_set883883+ },884884+#ifdef CONFIG_VFP885885+ [REGSET_VFP] = {886886+ /*887887+ * Pretend that the VFP regs are word-sized, since the FPSCR is888888+ * a single word dangling at the end of struct user_vfp:889889+ */890890+ .core_note_type = NT_ARM_VFP,891891+ .n = ARM_VFPREGS_SIZE / sizeof(u32),892892+ .size = sizeof(u32),893893+ .align = sizeof(u32),894894+ .get = vfp_get,895895+ .set = vfp_set896896+ },897897+#endif /* CONFIG_VFP */898898+};899899+900900+static const struct user_regset_view user_arm_view = {901901+ .name = "arm", .e_machine = ELF_ARCH, .ei_osabi = ELF_OSABI,902902+ .regsets = arm_regsets, .n = ARRAY_SIZE(arm_regsets)903903+};904904+905905+const struct user_regset_view *task_user_regset_view(struct task_struct *task)906906+{907907+ return &user_arm_view;908908+}909909+596910long arch_ptrace(struct task_struct *child, long request,597911 unsigned long addr, unsigned long data)598912{···822710 break;823711824712 case PTRACE_GETREGS:825825- ret = ptrace_getregs(child, datap);713713+ ret = copy_regset_to_user(child,714714+ &user_arm_view, REGSET_GPR,715715+ 0, sizeof(struct pt_regs),716716+ datap);826717 break;827718828719 case PTRACE_SETREGS:829829- ret = ptrace_setregs(child, datap);720720+ ret = copy_regset_from_user(child,721721+ &user_arm_view, REGSET_GPR,722722+ 0, sizeof(struct pt_regs),723723+ datap);830724 break;831725832726 case PTRACE_GETFPREGS:833833- ret = ptrace_getfpregs(child, datap);727727+ ret = copy_regset_to_user(child,728728+ &user_arm_view, REGSET_FPR,729729+ 0, sizeof(union fp_state),730730+ datap);834731 break;835835-732732+836733 case PTRACE_SETFPREGS:837837- ret = ptrace_setfpregs(child, datap);734734+ ret = copy_regset_from_user(child,735735+ &user_arm_view, REGSET_FPR,736736+ 0, sizeof(union fp_state),737737+ datap);838738 break;839739840740#ifdef CONFIG_IWMMXT···881757882758#ifdef CONFIG_VFP883759 case PTRACE_GETVFPREGS:884884- ret = ptrace_getvfpregs(child, datap);760760+ ret = copy_regset_to_user(child,761761+ &user_arm_view, REGSET_VFP,762762+ 0, ARM_VFPREGS_SIZE,763763+ datap);885764 break;886765887766 case PTRACE_SETVFPREGS:888888- ret = ptrace_setvfpregs(child, datap);767767+ ret = copy_regset_from_user(child,768768+ &user_arm_view, REGSET_VFP,769769+ 0, ARM_VFPREGS_SIZE,770770+ datap);889771 break;890772#endif891773
+9-4
arch/arm/kernel/setup.c
···672672673673static int __init parse_tag_cmdline(const struct tag *tag)674674{675675-#ifndef CONFIG_CMDLINE_FORCE676676- strlcpy(default_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE);677677-#else675675+#if defined(CONFIG_CMDLINE_EXTEND)676676+ strlcat(default_command_line, " ", COMMAND_LINE_SIZE);677677+ strlcat(default_command_line, tag->u.cmdline.cmdline,678678+ COMMAND_LINE_SIZE);679679+#elif defined(CONFIG_CMDLINE_FORCE)678680 pr_warning("Ignoring tag cmdline (using the default kernel command line)\n");679679-#endif /* CONFIG_CMDLINE_FORCE */681681+#else682682+ strlcpy(default_command_line, tag->u.cmdline.cmdline,683683+ COMMAND_LINE_SIZE);684684+#endif680685 return 0;681686}682687
···11-if ARCH_NS9XXX22-33-menu "NS9xxx Implementations"44-55-config NS9XXX_HAVE_SERIAL825066- bool77-88-config PROCESSOR_NS936099- bool1010-1111-config MODULE_CC9P93601212- bool1313- select PROCESSOR_NS93601414-1515-config BOARD_A9M9750DEV1616- select NS9XXX_HAVE_SERIAL82501717- bool1818-1919-config BOARD_JSCC9P93602020- bool2121-2222-config MACH_CC9P9360DEV2323- bool "ConnectCore 9P 9360 on an A9M9750 Devboard"2424- select MODULE_CC9P93602525- select BOARD_A9M9750DEV2626- help2727- Say Y here if you are using the Digi ConnectCore 9P 93602828- on an A9M9750 Development Board.2929-3030-config MACH_CC9P9360JS3131- bool "ConnectCore 9P 9360 on a JSCC9P9360 Devboard"3232- select MODULE_CC9P93603333- select BOARD_JSCC9P93603434- help3535- Say Y here if you are using the Digi ConnectCore 9P 93603636- on an JSCC9P9360 Development Board.3737-3838-endmenu3939-4040-endif
···11-/*22- * arch/arm/mach-ns9xxx/board-a9m9750dev.c33- *44- * Copyright (C) 2006,2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#include <linux/irq.h>1212-1313-#include <asm/mach/map.h>1414-#include <asm/gpio.h>1515-1616-#include <mach/board.h>1717-#include <mach/processor-ns9360.h>1818-#include <mach/regs-sys-ns9360.h>1919-#include <mach/regs-mem.h>2020-#include <mach/regs-bbu.h>2121-#include <mach/regs-board-a9m9750dev.h>2222-2323-#include "board-a9m9750dev.h"2424-2525-static struct map_desc board_a9m9750dev_io_desc[] __initdata = {2626- { /* FPGA on CS0 */2727- .virtual = io_p2v(NS9XXX_CSxSTAT_PHYS(0)),2828- .pfn = __phys_to_pfn(NS9XXX_CSxSTAT_PHYS(0)),2929- .length = NS9XXX_CS0STAT_LENGTH,3030- .type = MT_DEVICE,3131- },3232-};3333-3434-void __init board_a9m9750dev_map_io(void)3535-{3636- iotable_init(board_a9m9750dev_io_desc,3737- ARRAY_SIZE(board_a9m9750dev_io_desc));3838-}3939-4040-static void a9m9750dev_fpga_ack_irq(struct irq_data *d)4141-{4242- /* nothing */4343-}4444-4545-static void a9m9750dev_fpga_mask_irq(struct irq_data *d)4646-{4747- u8 ier;4848-4949- ier = __raw_readb(FPGA_IER);5050-5151- ier &= ~(1 << (d->irq - FPGA_IRQ(0)));5252-5353- __raw_writeb(ier, FPGA_IER);5454-}5555-5656-static void a9m9750dev_fpga_maskack_irq(struct irq_data *d)5757-{5858- a9m9750dev_fpga_mask_irq(d);5959- a9m9750dev_fpga_ack_irq(d);6060-}6161-6262-static void a9m9750dev_fpga_unmask_irq(struct irq_data *d)6363-{6464- u8 ier;6565-6666- ier = __raw_readb(FPGA_IER);6767-6868- ier |= 1 << (d->irq - FPGA_IRQ(0));6969-7070- __raw_writeb(ier, FPGA_IER);7171-}7272-7373-static struct irq_chip a9m9750dev_fpga_chip = {7474- .irq_ack = a9m9750dev_fpga_ack_irq,7575- .irq_mask = a9m9750dev_fpga_mask_irq,7676- .irq_mask_ack = a9m9750dev_fpga_maskack_irq,7777- .irq_unmask = a9m9750dev_fpga_unmask_irq,7878-};7979-8080-static void a9m9750dev_fpga_demux_handler(unsigned int irq,8181- struct irq_desc *desc)8282-{8383- u8 stat = __raw_readb(FPGA_ISR);8484-8585- desc->irq_data.chip->irq_mask_ack(&desc->irq_data);8686-8787- while (stat != 0) {8888- int irqno = fls(stat) - 1;8989-9090- stat &= ~(1 << irqno);9191-9292- generic_handle_irq(FPGA_IRQ(irqno));9393- }9494-9595- desc->irq_data.chip->irq_unmask(&desc->irq_data);9696-}9797-9898-void __init board_a9m9750dev_init_irq(void)9999-{100100- u32 eic;101101- int i;102102-103103- if (gpio_request(11, "board a9m9750dev extirq2") == 0)104104- ns9360_gpio_configure(11, 0, 1);105105- else106106- printk(KERN_ERR "%s: cannot get gpio 11 for IRQ_NS9XXX_EXT2\n",107107- __func__);108108-109109- for (i = FPGA_IRQ(0); i <= FPGA_IRQ(7); ++i) {110110- irq_set_chip_and_handler(i, &a9m9750dev_fpga_chip,111111- handle_level_irq);112112- set_irq_flags(i, IRQF_VALID);113113- }114114-115115- /* IRQ_NS9XXX_EXT2: level sensitive + active low */116116- eic = __raw_readl(SYS_EIC(2));117117- REGSET(eic, SYS_EIC, PLTY, AL);118118- REGSET(eic, SYS_EIC, LVEDG, LEVEL);119119- __raw_writel(eic, SYS_EIC(2));120120-121121- irq_set_chained_handler(IRQ_NS9XXX_EXT2,122122- a9m9750dev_fpga_demux_handler);123123-}124124-125125-void __init board_a9m9750dev_init_machine(void)126126-{127127- u32 reg;128128-129129- /* setup static CS0: memory base ... */130130- reg = __raw_readl(SYS_SMCSSMB(0));131131- REGSETIM(reg, SYS_SMCSSMB, CSxB, NS9XXX_CSxSTAT_PHYS(0) >> 12);132132- __raw_writel(reg, SYS_SMCSSMB(0));133133-134134- /* ... and mask */135135- reg = __raw_readl(SYS_SMCSSMM(0));136136- REGSETIM(reg, SYS_SMCSSMM, CSxM, 0xfffff);137137- REGSET(reg, SYS_SMCSSMM, CSEx, EN);138138- __raw_writel(reg, SYS_SMCSSMM(0));139139-140140- /* setup static CS0: memory configuration */141141- reg = __raw_readl(MEM_SMC(0));142142- REGSET(reg, MEM_SMC, PSMC, OFF);143143- REGSET(reg, MEM_SMC, BSMC, OFF);144144- REGSET(reg, MEM_SMC, EW, OFF);145145- REGSET(reg, MEM_SMC, PB, 1);146146- REGSET(reg, MEM_SMC, PC, AL);147147- REGSET(reg, MEM_SMC, PM, DIS);148148- REGSET(reg, MEM_SMC, MW, 8);149149- __raw_writel(reg, MEM_SMC(0));150150-151151- /* setup static CS0: timing */152152- __raw_writel(0x2, MEM_SMWED(0));153153- __raw_writel(0x2, MEM_SMOED(0));154154- __raw_writel(0x6, MEM_SMRD(0));155155- __raw_writel(0x6, MEM_SMWD(0));156156-}
-15
arch/arm/mach-ns9xxx/board-a9m9750dev.h
···11-/*22- * arch/arm/mach-ns9xxx/board-a9m9750dev.h33- *44- * Copyright (C) 2006 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#include <linux/init.h>1212-1313-void __init board_a9m9750dev_map_io(void);1414-void __init board_a9m9750dev_init_machine(void);1515-void __init board_a9m9750dev_init_irq(void);
-17
arch/arm/mach-ns9xxx/board-jscc9p9360.c
···11-/*22- * arch/arm/mach-ns9xxx/board-jscc9p9360.c33- *44- * Copyright (C) 2006,2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#include "board-jscc9p9360.h"1212-1313-void __init board_jscc9p9360_init_machine(void)1414-{1515- /* TODO: reserve GPIOs for push buttons, etc pp */1616-}1717-
-13
arch/arm/mach-ns9xxx/board-jscc9p9360.h
···11-/*22- * arch/arm/mach-ns9xxx/board-jscc9p9360.h33- *44- * Copyright (C) 2006 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#include <linux/init.h>1212-1313-void __init board_jscc9p9360_init_machine(void);
-215
arch/arm/mach-ns9xxx/clock.c
···11-/*22- * arch/arm/mach-ns9xxx/clock.c33- *44- * Copyright (C) 2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#include <linux/err.h>1212-#include <linux/module.h>1313-#include <linux/list.h>1414-#include <linux/clk.h>1515-#include <linux/string.h>1616-#include <linux/platform_device.h>1717-#include <linux/semaphore.h>1818-1919-#include "clock.h"2020-2121-static LIST_HEAD(clocks);2222-static DEFINE_SPINLOCK(clk_lock);2323-2424-struct clk *clk_get(struct device *dev, const char *id)2525-{2626- struct clk *p, *ret = NULL, *retgen = NULL;2727- unsigned long flags;2828- int idno;2929-3030- if (dev == NULL || dev->bus != &platform_bus_type)3131- idno = -1;3232- else3333- idno = to_platform_device(dev)->id;3434-3535- spin_lock_irqsave(&clk_lock, flags);3636- list_for_each_entry(p, &clocks, node) {3737- if (strcmp(id, p->name) == 0) {3838- if (p->id == idno) {3939- if (!try_module_get(p->owner))4040- continue;4141- ret = p;4242- break;4343- } else if (p->id == -1)4444- /* remember match with id == -1 in case there is4545- * no clock for idno */4646- retgen = p;4747- }4848- }4949-5050- if (!ret && retgen && try_module_get(retgen->owner))5151- ret = retgen;5252-5353- if (ret)5454- ++ret->refcount;5555-5656- spin_unlock_irqrestore(&clk_lock, flags);5757-5858- return ret ? ret : ERR_PTR(-ENOENT);5959-}6060-EXPORT_SYMBOL(clk_get);6161-6262-void clk_put(struct clk *clk)6363-{6464- module_put(clk->owner);6565- --clk->refcount;6666-}6767-EXPORT_SYMBOL(clk_put);6868-6969-static int clk_enable_unlocked(struct clk *clk)7070-{7171- int ret = 0;7272- if (clk->parent) {7373- ret = clk_enable_unlocked(clk->parent);7474- if (ret)7575- return ret;7676- }7777-7878- if (clk->usage++ == 0 && clk->endisable)7979- ret = clk->endisable(clk, 1);8080-8181- return ret;8282-}8383-8484-int clk_enable(struct clk *clk)8585-{8686- int ret;8787- unsigned long flags;8888-8989- spin_lock_irqsave(&clk_lock, flags);9090-9191- ret = clk_enable_unlocked(clk);9292-9393- spin_unlock_irqrestore(&clk_lock, flags);9494-9595- return ret;9696-}9797-EXPORT_SYMBOL(clk_enable);9898-9999-static void clk_disable_unlocked(struct clk *clk)100100-{101101- if (--clk->usage == 0 && clk->endisable)102102- clk->endisable(clk, 0);103103-104104- if (clk->parent)105105- clk_disable_unlocked(clk->parent);106106-}107107-108108-void clk_disable(struct clk *clk)109109-{110110- unsigned long flags;111111-112112- spin_lock_irqsave(&clk_lock, flags);113113-114114- clk_disable_unlocked(clk);115115-116116- spin_unlock_irqrestore(&clk_lock, flags);117117-}118118-EXPORT_SYMBOL(clk_disable);119119-120120-unsigned long clk_get_rate(struct clk *clk)121121-{122122- if (clk->get_rate)123123- return clk->get_rate(clk);124124-125125- if (clk->rate)126126- return clk->rate;127127-128128- if (clk->parent)129129- return clk_get_rate(clk->parent);130130-131131- return 0;132132-}133133-EXPORT_SYMBOL(clk_get_rate);134134-135135-int clk_register(struct clk *clk)136136-{137137- unsigned long flags;138138-139139- spin_lock_irqsave(&clk_lock, flags);140140-141141- list_add(&clk->node, &clocks);142142-143143- if (clk->parent)144144- ++clk->parent->refcount;145145-146146- spin_unlock_irqrestore(&clk_lock, flags);147147-148148- return 0;149149-}150150-151151-int clk_unregister(struct clk *clk)152152-{153153- int ret = 0;154154- unsigned long flags;155155-156156- spin_lock_irqsave(&clk_lock, flags);157157-158158- if (clk->usage || clk->refcount)159159- ret = -EBUSY;160160- else161161- list_del(&clk->node);162162-163163- if (clk->parent)164164- --clk->parent->refcount;165165-166166- spin_unlock_irqrestore(&clk_lock, flags);167167-168168- return ret;169169-}170170-171171-#if defined CONFIG_DEBUG_FS172172-173173-#include <linux/debugfs.h>174174-#include <linux/seq_file.h>175175-176176-static int clk_debugfs_show(struct seq_file *s, void *null)177177-{178178- unsigned long flags;179179- struct clk *p;180180-181181- spin_lock_irqsave(&clk_lock, flags);182182-183183- list_for_each_entry(p, &clocks, node)184184- seq_printf(s, "%s.%d: usage=%lu refcount=%lu rate=%lu\n",185185- p->name, p->id, p->usage, p->refcount,186186- p->usage ? clk_get_rate(p) : 0);187187-188188- spin_unlock_irqrestore(&clk_lock, flags);189189-190190- return 0;191191-}192192-193193-static int clk_debugfs_open(struct inode *inode, struct file *file)194194-{195195- return single_open(file, clk_debugfs_show, NULL);196196-}197197-198198-static const struct file_operations clk_debugfs_operations = {199199- .open = clk_debugfs_open,200200- .read = seq_read,201201- .llseek = seq_lseek,202202- .release = single_release,203203-};204204-205205-static int __init clk_debugfs_init(void)206206-{207207- struct dentry *dentry;208208-209209- dentry = debugfs_create_file("clk", S_IFREG | S_IRUGO, NULL, NULL,210210- &clk_debugfs_operations);211211- return IS_ERR(dentry) ? PTR_ERR(dentry) : 0;212212-}213213-subsys_initcall(clk_debugfs_init);214214-215215-#endif /* if defined CONFIG_DEBUG_FS */
-35
arch/arm/mach-ns9xxx/clock.h
···11-/*22- * arch/arm/mach-ns9xxx/clock.h33- *44- * Copyright (C) 2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#ifndef __NS9XXX_CLOCK_H1212-#define __NS9XXX_CLOCK_H1313-1414-#include <linux/list.h>1515-1616-struct clk {1717- struct module *owner;1818- const char *name;1919- int id;2020-2121- struct clk *parent;2222-2323- unsigned long rate;2424- int (*endisable)(struct clk *, int enable);2525- unsigned long (*get_rate)(struct clk *);2626-2727- struct list_head node;2828- unsigned long refcount;2929- unsigned long usage;3030-};3131-3232-int clk_register(struct clk *clk);3333-int clk_unregister(struct clk *clk);3434-3535-#endif /* ifndef __NS9XXX_CLOCK_H */
-19
arch/arm/mach-ns9xxx/generic.c
···11-/*22- * arch/arm/mach-ns9xxx/generic.c33- *44- * Copyright (C) 2006,2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#include <linux/kernel.h>1212-#include <linux/init.h>1313-#include <asm/memory.h>1414-1515-#include "generic.h"1616-1717-void __init ns9xxx_init_machine(void)1818-{1919-}
-16
arch/arm/mach-ns9xxx/generic.h
···11-/*22- * arch/arm/mach-ns9xxx/generic.h33- *44- * Copyright (C) 2006,2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#include <linux/time.h>1212-#include <asm/mach/time.h>1313-#include <linux/init.h>1414-1515-void __init ns9xxx_init_irq(void);1616-void __init ns9xxx_init_machine(void);
-118
arch/arm/mach-ns9xxx/gpio-ns9360.c
···11-/*22- * arch/arm/mach-ns9xxx/gpio-ns9360.c33- *44- * Copyright (C) 2006,2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#include <linux/bug.h>1212-#include <linux/errno.h>1313-#include <linux/io.h>1414-#include <linux/kernel.h>1515-#include <linux/module.h>1616-1717-#include <mach/regs-bbu.h>1818-#include <mach/processor-ns9360.h>1919-2020-#include "gpio-ns9360.h"2121-2222-static inline int ns9360_valid_gpio(unsigned gpio)2323-{2424- return gpio <= 72;2525-}2626-2727-static inline void __iomem *ns9360_gpio_get_gconfaddr(unsigned gpio)2828-{2929- if (gpio < 56)3030- return BBU_GCONFb1(gpio / 8);3131- else3232- /*3333- * this could be optimised away on3434- * ns9750 only builds, but it isn't ...3535- */3636- return BBU_GCONFb2((gpio - 56) / 8);3737-}3838-3939-static inline void __iomem *ns9360_gpio_get_gctrladdr(unsigned gpio)4040-{4141- if (gpio < 32)4242- return BBU_GCTRL1;4343- else if (gpio < 64)4444- return BBU_GCTRL2;4545- else4646- /* this could be optimised away on ns9750 only builds */4747- return BBU_GCTRL3;4848-}4949-5050-static inline void __iomem *ns9360_gpio_get_gstataddr(unsigned gpio)5151-{5252- if (gpio < 32)5353- return BBU_GSTAT1;5454- else if (gpio < 64)5555- return BBU_GSTAT2;5656- else5757- /* this could be optimised away on ns9750 only builds */5858- return BBU_GSTAT3;5959-}6060-6161-/*6262- * each gpio can serve for 4 different purposes [0..3]. These are called6363- * "functions" and passed in the parameter func. Functions 0-2 are always some6464- * special things, function 3 is GPIO. If func == 3 dir specifies input or6565- * output, and with inv you can enable an inverter (independent of func).6666- */6767-int __ns9360_gpio_configure(unsigned gpio, int dir, int inv, int func)6868-{6969- void __iomem *conf = ns9360_gpio_get_gconfaddr(gpio);7070- u32 confval;7171-7272- confval = __raw_readl(conf);7373- REGSETIM_IDX(confval, BBU_GCONFx, DIR, gpio & 7, dir);7474- REGSETIM_IDX(confval, BBU_GCONFx, INV, gpio & 7, inv);7575- REGSETIM_IDX(confval, BBU_GCONFx, FUNC, gpio & 7, func);7676- __raw_writel(confval, conf);7777-7878- return 0;7979-}8080-8181-int ns9360_gpio_configure(unsigned gpio, int inv, int func)8282-{8383- if (likely(ns9360_valid_gpio(gpio))) {8484- if (func == 3) {8585- printk(KERN_WARNING "use gpio_direction_input "8686- "or gpio_direction_output\n");8787- return -EINVAL;8888- } else8989- return __ns9360_gpio_configure(gpio, 0, inv, func);9090- } else9191- return -EINVAL;9292-}9393-EXPORT_SYMBOL(ns9360_gpio_configure);9494-9595-int ns9360_gpio_get_value(unsigned gpio)9696-{9797- void __iomem *stat = ns9360_gpio_get_gstataddr(gpio);9898- int ret;9999-100100- ret = 1 & (__raw_readl(stat) >> (gpio & 31));101101-102102- return ret;103103-}104104-105105-void ns9360_gpio_set_value(unsigned gpio, int value)106106-{107107- void __iomem *ctrl = ns9360_gpio_get_gctrladdr(gpio);108108- u32 ctrlval;109109-110110- ctrlval = __raw_readl(ctrl);111111-112112- if (value)113113- ctrlval |= 1 << (gpio & 31);114114- else115115- ctrlval &= ~(1 << (gpio & 31));116116-117117- __raw_writel(ctrlval, ctrl);118118-}
-13
arch/arm/mach-ns9xxx/gpio-ns9360.h
···11-/*22- * arch/arm/mach-ns9xxx/gpio-ns9360.h33- *44- * Copyright (C) 2006,2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-int __ns9360_gpio_configure(unsigned gpio, int dir, int inv, int func);1212-int ns9360_gpio_get_value(unsigned gpio);1313-void ns9360_gpio_set_value(unsigned gpio, int value);
-147
arch/arm/mach-ns9xxx/gpio.c
···11-/*22- * arch/arm/mach-ns9xxx/gpio.c33- *44- * Copyright (C) 2006,2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#include <linux/kernel.h>1212-#include <linux/compiler.h>1313-#include <linux/init.h>1414-#include <linux/spinlock.h>1515-#include <linux/module.h>1616-#include <linux/bitops.h>1717-1818-#include <mach/gpio.h>1919-#include <mach/processor.h>2020-#include <mach/processor-ns9360.h>2121-#include <asm/bug.h>2222-#include <asm/types.h>2323-2424-#include "gpio-ns9360.h"2525-2626-#if defined(CONFIG_PROCESSOR_NS9360)2727-#define GPIO_MAX 722828-#elif defined(CONFIG_PROCESSOR_NS9750)2929-#define GPIO_MAX 493030-#endif3131-3232-/* protects BBU_GCONFx and BBU_GCTRLx */3333-static spinlock_t gpio_lock = __SPIN_LOCK_UNLOCKED(gpio_lock);3434-3535-/* only access gpiores with atomic ops */3636-static DECLARE_BITMAP(gpiores, GPIO_MAX + 1);3737-3838-static inline int ns9xxx_valid_gpio(unsigned gpio)3939-{4040-#if defined(CONFIG_PROCESSOR_NS9360)4141- if (processor_is_ns9360())4242- return gpio <= 72;4343- else4444-#endif4545-#if defined(CONFIG_PROCESSOR_NS9750)4646- if (processor_is_ns9750())4747- return gpio <= 49;4848- else4949-#endif5050- {5151- BUG();5252- return 0;5353- }5454-}5555-5656-int gpio_request(unsigned gpio, const char *label)5757-{5858- if (likely(ns9xxx_valid_gpio(gpio)))5959- return test_and_set_bit(gpio, gpiores) ? -EBUSY : 0;6060- else6161- return -EINVAL;6262-}6363-EXPORT_SYMBOL(gpio_request);6464-6565-void gpio_free(unsigned gpio)6666-{6767- might_sleep();6868- clear_bit(gpio, gpiores);6969- return;7070-}7171-EXPORT_SYMBOL(gpio_free);7272-7373-int gpio_direction_input(unsigned gpio)7474-{7575- if (likely(ns9xxx_valid_gpio(gpio))) {7676- int ret = -EINVAL;7777- unsigned long flags;7878-7979- spin_lock_irqsave(&gpio_lock, flags);8080-#if defined(CONFIG_PROCESSOR_NS9360)8181- if (processor_is_ns9360())8282- ret = __ns9360_gpio_configure(gpio, 0, 0, 3);8383- else8484-#endif8585- BUG();8686-8787- spin_unlock_irqrestore(&gpio_lock, flags);8888-8989- return ret;9090-9191- } else9292- return -EINVAL;9393-}9494-EXPORT_SYMBOL(gpio_direction_input);9595-9696-int gpio_direction_output(unsigned gpio, int value)9797-{9898- if (likely(ns9xxx_valid_gpio(gpio))) {9999- int ret = -EINVAL;100100- unsigned long flags;101101-102102- gpio_set_value(gpio, value);103103-104104- spin_lock_irqsave(&gpio_lock, flags);105105-#if defined(CONFIG_PROCESSOR_NS9360)106106- if (processor_is_ns9360())107107- ret = __ns9360_gpio_configure(gpio, 1, 0, 3);108108- else109109-#endif110110- BUG();111111-112112- spin_unlock_irqrestore(&gpio_lock, flags);113113-114114- return ret;115115- } else116116- return -EINVAL;117117-}118118-EXPORT_SYMBOL(gpio_direction_output);119119-120120-int gpio_get_value(unsigned gpio)121121-{122122-#if defined(CONFIG_PROCESSOR_NS9360)123123- if (processor_is_ns9360())124124- return ns9360_gpio_get_value(gpio);125125- else126126-#endif127127- {128128- BUG();129129- return -EINVAL;130130- }131131-}132132-EXPORT_SYMBOL(gpio_get_value);133133-134134-void gpio_set_value(unsigned gpio, int value)135135-{136136- unsigned long flags;137137- spin_lock_irqsave(&gpio_lock, flags);138138-#if defined(CONFIG_PROCESSOR_NS9360)139139- if (processor_is_ns9360())140140- ns9360_gpio_set_value(gpio, value);141141- else142142-#endif143143- BUG();144144-145145- spin_unlock_irqrestore(&gpio_lock, flags);146146-}147147-EXPORT_SYMBOL(gpio_set_value);
-40
arch/arm/mach-ns9xxx/include/mach/board.h
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/board.h33- *44- * Copyright (C) 2006,2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#ifndef __ASM_ARCH_BOARD_H1212-#define __ASM_ARCH_BOARD_H1313-1414-#include <asm/mach-types.h>1515-1616-#define board_is_a9m9750dev() (0 \1717- || machine_is_cc9p9750dev() \1818- )1919-2020-#define board_is_a9mvali() (0 \2121- || machine_is_cc9p9750val() \2222- )2323-2424-#define board_is_jscc9p9210() (0 \2525- || machine_is_cc9p9210js() \2626- )2727-2828-#define board_is_jscc9p9215() (0 \2929- || machine_is_cc9p9215js() \3030- )3131-3232-#define board_is_jscc9p9360() (0 \3333- || machine_is_cc9p9360js() \3434- )3535-3636-#define board_is_uncbas() (0 \3737- || machine_is_cc7ucamry() \3838- )3939-4040-#endif /* ifndef __ASM_ARCH_BOARD_H */
-21
arch/arm/mach-ns9xxx/include/mach/debug-macro.S
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/debug-macro.S33- * Copyright (C) 2006 by Digi International Inc.44- * All rights reserved.55- *66- * This program is free software; you can redistribute it and/or modify it77- * under the terms of the GNU General Public License version 2 as published by88- * the Free Software Foundation.99- */1010-#include <mach/hardware.h>1111-#include <asm/memory.h>1212-1313-#include <mach/regs-board-a9m9750dev.h>1414-1515- .macro addruart, rp, rv1616- ldr \rp, =NS9XXX_CSxSTAT_PHYS(0)1717- ldr \rv, =io_p2v(NS9XXX_CSxSTAT_PHYS(0))1818- .endm1919-2020-#define UART_SHIFT 22121-#include <asm/hardware/debug-8250.S>
-28
arch/arm/mach-ns9xxx/include/mach/entry-macro.S
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/entry-macro.S33- *44- * Copyright (C) 2006,2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#include <mach/hardware.h>1212-#include <mach/regs-sys-common.h>1313-1414- .macro get_irqnr_preamble, base, tmp1515- ldr \base, =SYS_ISRADDR1616- .endm1717-1818- .macro arch_ret_to_user, tmp1, tmp21919- .endm2020-2121- .macro get_irqnr_and_base, irqnr, irqstat, base, tmp2222- ldr \irqstat, [\base, #(SYS_ISA - SYS_ISRADDR)]2323- cmp \irqstat, #02424- ldrne \irqnr, [\base]2525- .endm2626-2727- .macro disable_fiq2828- .endm
-47
arch/arm/mach-ns9xxx/include/mach/gpio.h
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/gpio.h33- *44- * Copyright (C) 2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010-*/1111-#ifndef __ASM_ARCH_GPIO_H1212-#define __ASM_ARCH_GPIO_H1313-1414-#include <asm/errno.h>1515-1616-int gpio_request(unsigned gpio, const char *label);1717-1818-void gpio_free(unsigned gpio);1919-2020-int ns9xxx_gpio_configure(unsigned gpio, int inv, int func);2121-2222-int gpio_direction_input(unsigned gpio);2323-2424-int gpio_direction_output(unsigned gpio, int value);2525-2626-int gpio_get_value(unsigned gpio);2727-2828-void gpio_set_value(unsigned gpio, int value);2929-3030-/*3131- * ns9xxx can use gpio pins to trigger an irq, but it's not generic3232- * enough to be supported by the gpio_to_irq/irq_to_gpio interface3333- */3434-static inline int gpio_to_irq(unsigned gpio)3535-{3636- return -EINVAL;3737-}3838-3939-static inline int irq_to_gpio(unsigned irq)4040-{4141- return -EINVAL;4242-}4343-4444-/* get the cansleep() stubs */4545-#include <asm-generic/gpio.h>4646-4747-#endif /* ifndef __ASM_ARCH_GPIO_H */
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/io.h33- *44- * Copyright (C) 2006 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#ifndef __ASM_ARCH_IO_H1212-#define __ASM_ARCH_IO_H1313-1414-#define IO_SPACE_LIMIT 0xffffffff /* XXX */1515-1616-#define __io(a) __typesafe_io(a)1717-#define __mem_pci(a) (a)1818-#define __mem_isa(a) (IO_BASE + (a))1919-2020-#endif /* ifndef __ASM_ARCH_IO_H */
-86
arch/arm/mach-ns9xxx/include/mach/irqs.h
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/irqs.h33- *44- * Copyright (C) 2006,2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#ifndef __ASM_ARCH_IRQS_H1212-#define __ASM_ARCH_IRQS_H1313-1414-/* NetSilicon 9360 */1515-#define IRQ_NS9XXX_WATCHDOG 01616-#define IRQ_NS9XXX_AHBBUSERR 11717-#define IRQ_NS9360_BBUSAGG 21818-/* irq 3 is reserved for NS9360 */1919-#define IRQ_NS9XXX_ETHRX 42020-#define IRQ_NS9XXX_ETHTX 52121-#define IRQ_NS9XXX_ETHPHY 62222-#define IRQ_NS9360_LCD 72323-#define IRQ_NS9360_SERBRX 82424-#define IRQ_NS9360_SERBTX 92525-#define IRQ_NS9360_SERARX 102626-#define IRQ_NS9360_SERATX 112727-#define IRQ_NS9360_SERCRX 122828-#define IRQ_NS9360_SERCTX 132929-#define IRQ_NS9360_I2C 143030-#define IRQ_NS9360_BBUSDMA 153131-#define IRQ_NS9360_TIMER0 163232-#define IRQ_NS9360_TIMER1 173333-#define IRQ_NS9360_TIMER2 183434-#define IRQ_NS9360_TIMER3 193535-#define IRQ_NS9360_TIMER4 203636-#define IRQ_NS9360_TIMER5 213737-#define IRQ_NS9360_TIMER6 223838-#define IRQ_NS9360_TIMER7 233939-#define IRQ_NS9360_RTC 244040-#define IRQ_NS9360_USBHOST 254141-#define IRQ_NS9360_USBDEVICE 264242-#define IRQ_NS9360_IEEE1284 274343-#define IRQ_NS9XXX_EXT0 284444-#define IRQ_NS9XXX_EXT1 294545-#define IRQ_NS9XXX_EXT2 304646-#define IRQ_NS9XXX_EXT3 314747-4848-#define BBUS_IRQ(irq) (32 + irq)4949-5050-#define IRQ_BBUS_DMA BBUS_IRQ(0)5151-#define IRQ_BBUS_SERBRX BBUS_IRQ(2)5252-#define IRQ_BBUS_SERBTX BBUS_IRQ(3)5353-#define IRQ_BBUS_SERARX BBUS_IRQ(4)5454-#define IRQ_BBUS_SERATX BBUS_IRQ(5)5555-#define IRQ_BBUS_SERCRX BBUS_IRQ(6)5656-#define IRQ_BBUS_SERCTX BBUS_IRQ(7)5757-#define IRQ_BBUS_SERDRX BBUS_IRQ(8)5858-#define IRQ_BBUS_SERDTX BBUS_IRQ(9)5959-#define IRQ_BBUS_I2C BBUS_IRQ(10)6060-#define IRQ_BBUS_1284 BBUS_IRQ(11)6161-#define IRQ_BBUS_UTIL BBUS_IRQ(12)6262-#define IRQ_BBUS_RTC BBUS_IRQ(13)6363-#define IRQ_BBUS_USBHST BBUS_IRQ(14)6464-#define IRQ_BBUS_USBDEV BBUS_IRQ(15)6565-#define IRQ_BBUS_AHBDMA1 BBUS_IRQ(24)6666-#define IRQ_BBUS_AHBDMA2 BBUS_IRQ(25)6767-6868-/*6969- * these Interrupts are specific for the a9m9750dev board.7070- * They are generated by an FPGA that interrupts the CPU on7171- * IRQ_NS9360_EXT27272- */7373-#define FPGA_IRQ(irq) (64 + irq)7474-7575-#define IRQ_FPGA_UARTA FPGA_IRQ(0)7676-#define IRQ_FPGA_UARTB FPGA_IRQ(1)7777-#define IRQ_FPGA_UARTC FPGA_IRQ(2)7878-#define IRQ_FPGA_UARTD FPGA_IRQ(3)7979-#define IRQ_FPGA_TOUCH FPGA_IRQ(4)8080-#define IRQ_FPGA_CF FPGA_IRQ(5)8181-#define IRQ_FPGA_CAN0 FPGA_IRQ(6)8282-#define IRQ_FPGA_CAN1 FPGA_IRQ(7)8383-8484-#define NR_IRQS 728585-8686-#endif /* __ASM_ARCH_IRQS_H */
-24
arch/arm/mach-ns9xxx/include/mach/memory.h
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/memory.h33- *44- * Copyright (C) 2006 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010-*/1111-#ifndef __ASM_ARCH_MEMORY_H1212-#define __ASM_ARCH_MEMORY_H1313-1414-/* x in [0..3] */1515-#define NS9XXX_CSxSTAT_PHYS(x) UL(((x) + 4) << 28)1616-1717-#define NS9XXX_CS0STAT_LENGTH UL(0x1000)1818-#define NS9XXX_CS1STAT_LENGTH UL(0x1000)1919-#define NS9XXX_CS2STAT_LENGTH UL(0x1000)2020-#define NS9XXX_CS3STAT_LENGTH UL(0x1000)2121-2222-#define PLAT_PHYS_OFFSET UL(0x00000000)2323-2424-#endif
-55
arch/arm/mach-ns9xxx/include/mach/module.h
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/module.h33- *44- * Copyright (C) 2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#ifndef __ASM_ARCH_MODULE_H1212-#define __ASM_ARCH_MODULE_H1313-1414-#include <asm/mach-types.h>1515-1616-#define module_is_cc7ucamry() (0 \1717- || machine_is_cc7ucamry() \1818- )1919-2020-#define module_is_cc9c() (0 \2121- )2222-2323-#define module_is_cc9p9210() (0 \2424- || machine_is_cc9p9210() \2525- || machine_is_cc9p9210js() \2626- )2727-2828-#define module_is_cc9p9215() (0 \2929- || machine_is_cc9p9215() \3030- || machine_is_cc9p9215js() \3131- )3232-3333-#define module_is_cc9p9360() (0 \3434- || machine_is_cc9p9360dev() \3535- || machine_is_cc9p9360js() \3636- )3737-3838-#define module_is_cc9p9750() (0 \3939- || machine_is_a9m9750() \4040- || machine_is_cc9p9750js() \4141- || machine_is_cc9p9750val() \4242- )4343-4444-#define module_is_ccw9c() (0 \4545- )4646-4747-#define module_is_inc20otter() (0 \4848- || machine_is_inc20otter() \4949- )5050-5151-#define module_is_otter() (0 \5252- || machine_is_otter() \5353- )5454-5555-#endif /* ifndef __ASM_ARCH_MODULE_H */
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/processor-ns9360.h33- *44- * Copyright (C) 2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#ifndef __ASM_ARCH_PROCESSORNS9360_H1212-#define __ASM_ARCH_PROCESSORNS9360_H1313-1414-#include <linux/init.h>1515-1616-void ns9360_reset(char mode);1717-1818-unsigned long ns9360_systemclock(void) __attribute__((const));1919-2020-static inline unsigned long ns9360_cpuclock(void) __attribute__((const));2121-static inline unsigned long ns9360_cpuclock(void)2222-{2323- return ns9360_systemclock() / 2;2424-}2525-2626-void __init ns9360_map_io(void);2727-2828-extern struct sys_timer ns9360_timer;2929-3030-int ns9360_gpio_configure(unsigned gpio, int inv, int func);3131-3232-#endif /* ifndef __ASM_ARCH_PROCESSORNS9360_H */
-42
arch/arm/mach-ns9xxx/include/mach/processor.h
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/processor.h33- *44- * Copyright (C) 2006,2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#ifndef __ASM_ARCH_PROCESSOR_H1212-#define __ASM_ARCH_PROCESSOR_H1313-1414-#include <mach/module.h>1515-1616-#define processor_is_ns9210() (0 \1717- || module_is_cc7ucamry() \1818- || module_is_cc9p9210() \1919- || module_is_inc20otter() \2020- || module_is_otter() \2121- )2222-2323-#define processor_is_ns9215() (0 \2424- || module_is_cc9p9215() \2525- )2626-2727-#define processor_is_ns9360() (0 \2828- || module_is_cc9p9360() \2929- || module_is_cc9c() \3030- || module_is_ccw9c() \3131- )3232-3333-#define processor_is_ns9750() (0 \3434- || module_is_cc9p9750() \3535- )3636-3737-#define processor_is_ns921x() (0 \3838- || processor_is_ns9210() \3939- || processor_is_ns9215() \4040- )4141-4242-#endif /* ifndef __ASM_ARCH_PROCESSOR_H */
-45
arch/arm/mach-ns9xxx/include/mach/regs-bbu.h
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/regs-bbu.h33- *44- * Copyright (C) 2006 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#ifndef __ASM_ARCH_REGSBBU_H1212-#define __ASM_ARCH_REGSBBU_H1313-1414-#include <mach/hardware.h>1515-1616-/* BBus Utility */1717-1818-/* GPIO Configuration Registers block 1 */1919-/* NOTE: the HRM starts counting at 1 for the GPIO registers, here the start is2020- * at 0 for each block. That is, BBU_GCONFb1(0) is GPIO Configuration Register2121- * #1, BBU_GCONFb2(0) is GPIO Configuration Register #8. */2222-#define BBU_GCONFb1(x) __REG2(0x90600010, (x))2323-#define BBU_GCONFb2(x) __REG2(0x90600100, (x))2424-2525-#define BBU_GCONFx_DIR(m) __REGBIT(3 + (((m) & 7) << 2))2626-#define BBU_GCONFx_DIR_INPUT(m) __REGVAL(BBU_GCONFx_DIR(m), 0)2727-#define BBU_GCONFx_DIR_OUTPUT(m) __REGVAL(BBU_GCONFx_DIR(m), 1)2828-#define BBU_GCONFx_INV(m) __REGBIT(2 + (((m) & 7) << 2))2929-#define BBU_GCONFx_INV_NO(m) __REGVAL(BBU_GCONFx_INV(m), 0)3030-#define BBU_GCONFx_INV_YES(m) __REGVAL(BBU_GCONFx_INV(m), 1)3131-#define BBU_GCONFx_FUNC(m) __REGBITS(1 + (((m) & 7) << 2), ((m) & 7) << 2)3232-#define BBU_GCONFx_FUNC_0(m) __REGVAL(BBU_GCONFx_FUNC(m), 0)3333-#define BBU_GCONFx_FUNC_1(m) __REGVAL(BBU_GCONFx_FUNC(m), 1)3434-#define BBU_GCONFx_FUNC_2(m) __REGVAL(BBU_GCONFx_FUNC(m), 2)3535-#define BBU_GCONFx_FUNC_3(m) __REGVAL(BBU_GCONFx_FUNC(m), 3)3636-3737-#define BBU_GCTRL1 __REG(0x90600030)3838-#define BBU_GCTRL2 __REG(0x90600034)3939-#define BBU_GCTRL3 __REG(0x90600120)4040-4141-#define BBU_GSTAT1 __REG(0x90600040)4242-#define BBU_GSTAT2 __REG(0x90600044)4343-#define BBU_GSTAT3 __REG(0x90600130)4444-4545-#endif /* ifndef __ASM_ARCH_REGSBBU_H */
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/regs-board-a9m9750dev.h33- *44- * Copyright (C) 2006 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#ifndef __ASM_ARCH_REGSBOARDA9M9750_H1212-#define __ASM_ARCH_REGSBOARDA9M9750_H1313-1414-#include <mach/hardware.h>1515-1616-#define FPGA_UARTA_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0))1717-#define FPGA_UARTB_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x08)1818-#define FPGA_UARTC_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x10)1919-#define FPGA_UARTD_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x18)2020-2121-#define FPGA_IER __REG(NS9XXX_CSxSTAT_PHYS(0) + 0x50)2222-#define FPGA_ISR __REG(NS9XXX_CSxSTAT_PHYS(0) + 0x60)2323-2424-#endif /* ifndef __ASM_ARCH_REGSBOARDA9M9750_H */
-135
arch/arm/mach-ns9xxx/include/mach/regs-mem.h
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/regs-mem.h33- *44- * Copyright (C) 2006 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#ifndef __ASM_ARCH_REGSMEM_H1212-#define __ASM_ARCH_REGSMEM_H1313-1414-#include <mach/hardware.h>1515-1616-/* Memory Module */1717-1818-/* Control register */1919-#define MEM_CTRL __REG(0xa0700000)2020-2121-/* Status register */2222-#define MEM_STAT __REG(0xa0700004)2323-2424-/* Configuration register */2525-#define MEM_CONF __REG(0xa0700008)2626-2727-/* Dynamic Memory Control register */2828-#define MEM_DMCTRL __REG(0xa0700020)2929-3030-/* Dynamic Memory Refresh Timer */3131-#define MEM_DMRT __REG(0xa0700024)3232-3333-/* Dynamic Memory Read Configuration register */3434-#define MEM_DMRC __REG(0xa0700028)3535-3636-/* Dynamic Memory Precharge Command Period (tRP) */3737-#define MEM_DMPCP __REG(0xa0700030)3838-3939-/* Dynamic Memory Active to Precharge Command Period (tRAS) */4040-#define MEM_DMAPCP __REG(0xa0700034)4141-4242-/* Dynamic Memory Self-Refresh Exit Time (tSREX) */4343-#define MEM_DMSRET __REG(0xa0700038)4444-4545-/* Dynamic Memory Last Data Out to Active Time (tAPR) */4646-#define MEM_DMLDOAT __REG(0xa070003c)4747-4848-/* Dynamic Memory Data-in to Active Command Time (tDAL or TAPW) */4949-#define MEM_DMDIACT __REG(0xa0700040)5050-5151-/* Dynamic Memory Write Recovery Time (tWR, tDPL, tRWL, tRDL) */5252-#define MEM_DMWRT __REG(0xa0700044)5353-5454-/* Dynamic Memory Active to Active Command Period (tRC) */5555-#define MEM_DMAACP __REG(0xa0700048)5656-5757-/* Dynamic Memory Auto Refresh Period, and Auto Refresh to Active Command Period (tRFC) */5858-#define MEM_DMARP __REG(0xa070004c)5959-6060-/* Dynamic Memory Exit Self-Refresh to Active Command (tXSR) */6161-#define MEM_DMESRAC __REG(0xa0700050)6262-6363-/* Dynamic Memory Active Bank A to Active B Time (tRRD) */6464-#define MEM_DMABAABT __REG(0xa0700054)6565-6666-/* Dynamic Memory Load Mode register to Active Command Time (tMRD) */6767-#define MEM_DMLMACT __REG(0xa0700058)6868-6969-/* Static Memory Extended Wait */7070-#define MEM_SMEW __REG(0xa0700080)7171-7272-/* Dynamic Memory Configuration Register x */7373-#define MEM_DMCONF(x) __REG2(0xa0700100, (x) << 3)7474-7575-/* Dynamic Memory RAS and CAS Delay x */7676-#define MEM_DMRCD(x) __REG2(0xa0700104, (x) << 3)7777-7878-/* Static Memory Configuration Register x */7979-#define MEM_SMC(x) __REG2(0xa0700200, (x) << 3)8080-8181-/* Static Memory Configuration Register x: Write protect */8282-#define MEM_SMC_PSMC __REGBIT(20)8383-#define MEM_SMC_PSMC_OFF __REGVAL(MEM_SMC_PSMC, 0)8484-#define MEM_SMC_PSMC_ON __REGVAL(MEM_SMC_PSMC, 1)8585-8686-/* Static Memory Configuration Register x: Buffer enable */8787-#define MEM_SMC_BSMC __REGBIT(19)8888-#define MEM_SMC_BSMC_OFF __REGVAL(MEM_SMC_BSMC, 0)8989-#define MEM_SMC_BSMC_ON __REGVAL(MEM_SMC_BSMC, 1)9090-9191-/* Static Memory Configuration Register x: Extended Wait */9292-#define MEM_SMC_EW __REGBIT(8)9393-#define MEM_SMC_EW_OFF __REGVAL(MEM_SMC_EW, 0)9494-#define MEM_SMC_EW_ON __REGVAL(MEM_SMC_EW, 1)9595-9696-/* Static Memory Configuration Register x: Byte lane state */9797-#define MEM_SMC_PB __REGBIT(7)9898-#define MEM_SMC_PB_0 __REGVAL(MEM_SMC_PB, 0)9999-#define MEM_SMC_PB_1 __REGVAL(MEM_SMC_PB, 1)100100-101101-/* Static Memory Configuration Register x: Chip select polarity */102102-#define MEM_SMC_PC __REGBIT(6)103103-#define MEM_SMC_PC_AL __REGVAL(MEM_SMC_PC, 0)104104-#define MEM_SMC_PC_AH __REGVAL(MEM_SMC_PC, 1)105105-106106-/* static memory configuration register x: page mode*/107107-#define MEM_SMC_PM __REGBIT(3)108108-#define MEM_SMC_PM_DIS __REGVAL(MEM_SMC_PM, 0)109109-#define MEM_SMC_PM_ASYNC __REGVAL(MEM_SMC_PM, 1)110110-111111-/* static memory configuration register x: Memory width */112112-#define MEM_SMC_MW __REGBITS(1, 0)113113-#define MEM_SMC_MW_8 __REGVAL(MEM_SMC_MW, 0)114114-#define MEM_SMC_MW_16 __REGVAL(MEM_SMC_MW, 1)115115-#define MEM_SMC_MW_32 __REGVAL(MEM_SMC_MW, 2)116116-117117-/* Static Memory Write Enable Delay x */118118-#define MEM_SMWED(x) __REG2(0xa0700204, (x) << 3)119119-120120-/* Static Memory Output Enable Delay x */121121-#define MEM_SMOED(x) __REG2(0xa0700208, (x) << 3)122122-123123-/* Static Memory Read Delay x */124124-#define MEM_SMRD(x) __REG2(0xa070020c, (x) << 3)125125-126126-/* Static Memory Page Mode Read Delay 0 */127127-#define MEM_SMPMRD(x) __REG2(0xa0700210, (x) << 3)128128-129129-/* Static Memory Write Delay */130130-#define MEM_SMWD(x) __REG2(0xa0700214, (x) << 3)131131-132132-/* Static Memory Turn Round Delay x */133133-#define MEM_SWT(x) __REG2(0xa0700218, (x) << 3)134134-135135-#endif /* ifndef __ASM_ARCH_REGSMEM_H */
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/regs-sys-common.h33- *44- * Copyright (C) 2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-1212-#ifndef __ASM_ARCH_REGSSYSCOMMON_H1313-#define __ASM_ARCH_REGSSYSCOMMON_H1414-#include <mach/hardware.h>1515-1616-/* Interrupt Vector Address Register Level x */1717-#define SYS_IVA(x) __REG2(0xa09000c4, (x))1818-1919-/* Interrupt Configuration registers */2020-#define SYS_IC(x) __REG2(0xa0900144, (x))2121-2222-/* ISRADDR */2323-#define SYS_ISRADDR __REG(0xa0900164)2424-2525-/* Interrupt Status Active */2626-#define SYS_ISA __REG(0xa0900168)2727-2828-/* Interrupt Status Raw */2929-#define SYS_ISR __REG(0xa090016c)3030-3131-#endif /* ifndef __ASM_ARCH_REGSSYSCOMMON_H */
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/regs-sys-ns9360.h33- *44- * Copyright (C) 2006,2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#ifndef __ASM_ARCH_REGSSYSNS9360_H1212-#define __ASM_ARCH_REGSSYSNS9360_H1313-1414-#include <mach/hardware.h>1515-1616-/* System Control Module */1717-1818-/* AHB Arbiter Gen Configuration */1919-#define SYS_AHBAGENCONF __REG(0xa0900000)2020-2121-/* BRC */2222-#define SYS_BRC(x) __REG2(0xa0900004, (x))2323-2424-/* Timer x Reload Count register */2525-#define SYS_TRC(x) __REG2(0xa0900044, (x))2626-2727-/* Timer x Read register */2828-#define SYS_TR(x) __REG2(0xa0900084, (x))2929-3030-/* Timer Interrupt Status register */3131-#define SYS_TIS __REG(0xa0900170)3232-3333-/* PLL Configuration register */3434-#define SYS_PLL __REG(0xa0900188)3535-3636-/* PLL FS status */3737-#define SYS_PLL_FS __REGBITS(24, 23)3838-3939-/* PLL ND status */4040-#define SYS_PLL_ND __REGBITS(20, 16)4141-4242-/* PLL Configuration register: PLL SW change */4343-#define SYS_PLL_SWC __REGBIT(15)4444-#define SYS_PLL_SWC_NO __REGVAL(SYS_PLL_SWC, 0)4545-#define SYS_PLL_SWC_YES __REGVAL(SYS_PLL_SWC, 1)4646-4747-/* Timer x Control register */4848-#define SYS_TC(x) __REG2(0xa0900190, (x))4949-5050-/* Timer x Control register: Timer enable */5151-#define SYS_TCx_TEN __REGBIT(15)5252-#define SYS_TCx_TEN_DIS __REGVAL(SYS_TCx_TEN, 0)5353-#define SYS_TCx_TEN_EN __REGVAL(SYS_TCx_TEN, 1)5454-5555-/* Timer x Control register: CPU debug mode */5656-#define SYS_TCx_TDBG __REGBIT(10)5757-#define SYS_TCx_TDBG_CONT __REGVAL(SYS_TCx_TDBG, 0)5858-#define SYS_TCx_TDBG_STOP __REGVAL(SYS_TCx_TDBG, 1)5959-6060-/* Timer x Control register: Interrupt clear */6161-#define SYS_TCx_INTC __REGBIT(9)6262-#define SYS_TCx_INTC_UNSET __REGVAL(SYS_TCx_INTC, 0)6363-#define SYS_TCx_INTC_SET __REGVAL(SYS_TCx_INTC, 1)6464-6565-/* Timer x Control register: Timer clock select */6666-#define SYS_TCx_TLCS __REGBITS(8, 6)6767-#define SYS_TCx_TLCS_CPU __REGVAL(SYS_TCx_TLCS, 0) /* CPU clock */6868-#define SYS_TCx_TLCS_DIV2 __REGVAL(SYS_TCx_TLCS, 1) /* CPU clock / 2 */6969-#define SYS_TCx_TLCS_DIV4 __REGVAL(SYS_TCx_TLCS, 2) /* CPU clock / 4 */7070-#define SYS_TCx_TLCS_DIV8 __REGVAL(SYS_TCx_TLCS, 3) /* CPU clock / 8 */7171-#define SYS_TCx_TLCS_DIV16 __REGVAL(SYS_TCx_TLCS, 4) /* CPU clock / 16 */7272-#define SYS_TCx_TLCS_DIV32 __REGVAL(SYS_TCx_TLCS, 5) /* CPU clock / 32 */7373-#define SYS_TCx_TLCS_DIV64 __REGVAL(SYS_TCx_TLCS, 6) /* CPU clock / 64 */7474-#define SYS_TCx_TLCS_EXT __REGVAL(SYS_TCx_TLCS, 7)7575-7676-/* Timer x Control register: Timer mode */7777-#define SYS_TCx_TM __REGBITS(5, 4)7878-#define SYS_TCx_TM_IEE __REGVAL(SYS_TCx_TM, 0) /* Internal timer or external event */7979-#define SYS_TCx_TM_ELL __REGVAL(SYS_TCx_TM, 1) /* External low-level, gated timer */8080-#define SYS_TCx_TM_EHL __REGVAL(SYS_TCx_TM, 2) /* External high-level, gated timer */8181-#define SYS_TCx_TM_CONCAT __REGVAL(SYS_TCx_TM, 3) /* Concatenate the lower timer. */8282-8383-/* Timer x Control register: Interrupt select */8484-#define SYS_TCx_INTS __REGBIT(3)8585-#define SYS_TCx_INTS_DIS __REGVAL(SYS_TCx_INTS, 0)8686-#define SYS_TCx_INTS_EN __REGVAL(SYS_TCx_INTS, 1)8787-8888-/* Timer x Control register: Up/down select */8989-#define SYS_TCx_UDS __REGBIT(2)9090-#define SYS_TCx_UDS_UP __REGVAL(SYS_TCx_UDS, 0)9191-#define SYS_TCx_UDS_DOWN __REGVAL(SYS_TCx_UDS, 1)9292-9393-/* Timer x Control register: 32- or 16-bit timer */9494-#define SYS_TCx_TSZ __REGBIT(1)9595-#define SYS_TCx_TSZ_16 __REGVAL(SYS_TCx_TSZ, 0)9696-#define SYS_TCx_TSZ_32 __REGVAL(SYS_TCx_TSZ, 1)9797-9898-/* Timer x Control register: Reload enable */9999-#define SYS_TCx_REN __REGBIT(0)100100-#define SYS_TCx_REN_DIS __REGVAL(SYS_TCx_REN, 0)101101-#define SYS_TCx_REN_EN __REGVAL(SYS_TCx_REN, 1)102102-103103-/* System Memory Chip Select x Dynamic Memory Base */104104-#define SYS_SMCSDMB(x) __REG2(0xa09001d0, (x) << 1)105105-106106-/* System Memory Chip Select x Dynamic Memory Mask */107107-#define SYS_SMCSDMM(x) __REG2(0xa09001d4, (x) << 1)108108-109109-/* System Memory Chip Select x Static Memory Base */110110-#define SYS_SMCSSMB(x) __REG2(0xa09001f0, (x) << 1)111111-112112-/* System Memory Chip Select x Static Memory Base: Chip select x base */113113-#define SYS_SMCSSMB_CSxB __REGBITS(31, 12)114114-115115-/* System Memory Chip Select x Static Memory Mask */116116-#define SYS_SMCSSMM(x) __REG2(0xa09001f4, (x) << 1)117117-118118-/* System Memory Chip Select x Static Memory Mask: Chip select x mask */119119-#define SYS_SMCSSMM_CSxM __REGBITS(31, 12)120120-121121-/* System Memory Chip Select x Static Memory Mask: Chip select x enable */122122-#define SYS_SMCSSMM_CSEx __REGBIT(0)123123-#define SYS_SMCSSMM_CSEx_DIS __REGVAL(SYS_SMCSSMM_CSEx, 0)124124-#define SYS_SMCSSMM_CSEx_EN __REGVAL(SYS_SMCSSMM_CSEx, 1)125125-126126-/* General purpose, user-defined ID register */127127-#define SYS_GENID __REG(0xa0900210)128128-129129-/* External Interrupt x Control register */130130-#define SYS_EIC(x) __REG2(0xa0900214, (x))131131-132132-/* External Interrupt x Control register: Status */133133-#define SYS_EIC_STS __REGBIT(3)134134-135135-/* External Interrupt x Control register: Clear */136136-#define SYS_EIC_CLR __REGBIT(2)137137-138138-/* External Interrupt x Control register: Polarity */139139-#define SYS_EIC_PLTY __REGBIT(1)140140-#define SYS_EIC_PLTY_AH __REGVAL(SYS_EIC_PLTY, 0)141141-#define SYS_EIC_PLTY_AL __REGVAL(SYS_EIC_PLTY, 1)142142-143143-/* External Interrupt x Control register: Level edge */144144-#define SYS_EIC_LVEDG __REGBIT(0)145145-#define SYS_EIC_LVEDG_LEVEL __REGVAL(SYS_EIC_LVEDG, 0)146146-#define SYS_EIC_LVEDG_EDGE __REGVAL(SYS_EIC_LVEDG, 1)147147-148148-#endif /* ifndef __ASM_ARCH_REGSSYSNS9360_H */
-35
arch/arm/mach-ns9xxx/include/mach/system.h
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/system.h33- *44- * Copyright (C) 2006,2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#ifndef __ASM_ARCH_SYSTEM_H1212-#define __ASM_ARCH_SYSTEM_H1313-1414-#include <asm/proc-fns.h>1515-#include <mach/processor.h>1616-#include <mach/processor-ns9360.h>1717-1818-static inline void arch_idle(void)1919-{2020- cpu_do_idle();2121-}2222-2323-static inline void arch_reset(char mode, const char *cmd)2424-{2525-#ifdef CONFIG_PROCESSOR_NS93602626- if (processor_is_ns9360())2727- ns9360_reset(mode);2828- else2929-#endif3030- BUG();3131-3232- BUG();3333-}3434-3535-#endif /* ifndef __ASM_ARCH_SYSTEM_H */
-20
arch/arm/mach-ns9xxx/include/mach/timex.h
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/timex.h33- *44- * Copyright (C) 2005-2006 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#ifndef __ASM_ARCH_TIMEX_H1212-#define __ASM_ARCH_TIMEX_H1313-1414-/*1515- * value for CLOCK_TICK_RATE stolen from arch/arm/mach-s3c2410/include/mach/timex.h.1616- * See there for an explanation.1717- */1818-#define CLOCK_TICK_RATE 120000001919-2020-#endif /* ifndef __ASM_ARCH_TIMEX_H */
-164
arch/arm/mach-ns9xxx/include/mach/uncompress.h
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/uncompress.h33- *44- * Copyright (C) 2006 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#ifndef __ASM_ARCH_UNCOMPRESS_H1212-#define __ASM_ARCH_UNCOMPRESS_H1313-1414-#include <linux/io.h>1515-1616-#define __REG(x) ((void __iomem __force *)(x))1717-1818-static void putc_dummy(char c, void __iomem *base)1919-{2020- /* nothing */2121-}2222-2323-static int timeout;2424-2525-static void putc_ns9360(char c, void __iomem *base)2626-{2727- do {2828- if (timeout)2929- --timeout;3030-3131- if (__raw_readl(base + 8) & (1 << 3)) {3232- __raw_writeb(c, base + 16);3333- timeout = 0x10000;3434- break;3535- }3636- } while (timeout);3737-}3838-3939-static void putc_a9m9750dev(char c, void __iomem *base)4040-{4141- do {4242- if (timeout)4343- --timeout;4444-4545- if (__raw_readb(base + 5) & (1 << 5)) {4646- __raw_writeb(c, base);4747- timeout = 0x10000;4848- break;4949- }5050- } while (timeout);5151-5252-}5353-5454-static void putc_ns921x(char c, void __iomem *base)5555-{5656- do {5757- if (timeout)5858- --timeout;5959-6060- if (!(__raw_readl(base) & (1 << 11))) {6161- __raw_writeb(c, base + 0x0028);6262- timeout = 0x10000;6363- break;6464- }6565- } while (timeout);6666-}6767-6868-#define MSCS __REG(0xA0900184)6969-7070-#define NS9360_UARTA __REG(0x90200040)7171-#define NS9360_UARTB __REG(0x90200000)7272-#define NS9360_UARTC __REG(0x90300000)7373-#define NS9360_UARTD __REG(0x90300040)7474-7575-#define NS9360_UART_ENABLED(base) \7676- (__raw_readl(NS9360_UARTA) & (1 << 31))7777-7878-#define A9M9750DEV_UARTA __REG(0x40000000)7979-8080-#define NS921XSYS_CLOCK __REG(0xa090017c)8181-#define NS921X_UARTA __REG(0x90010000)8282-#define NS921X_UARTB __REG(0x90018000)8383-#define NS921X_UARTC __REG(0x90020000)8484-#define NS921X_UARTD __REG(0x90028000)8585-8686-#define NS921X_UART_ENABLED(base) \8787- (__raw_readl((base) + 0x1000) & (1 << 29))8888-8989-static void autodetect(void (**putc)(char, void __iomem *), void __iomem **base)9090-{9191- timeout = 0x10000;9292- if (((__raw_readl(MSCS) >> 16) & 0xfe) == 0x00) {9393- /* ns9360 or ns9750 */9494- if (NS9360_UART_ENABLED(NS9360_UARTA)) {9595- *putc = putc_ns9360;9696- *base = NS9360_UARTA;9797- return;9898- } else if (NS9360_UART_ENABLED(NS9360_UARTB)) {9999- *putc = putc_ns9360;100100- *base = NS9360_UARTB;101101- return;102102- } else if (NS9360_UART_ENABLED(NS9360_UARTC)) {103103- *putc = putc_ns9360;104104- *base = NS9360_UARTC;105105- return;106106- } else if (NS9360_UART_ENABLED(NS9360_UARTD)) {107107- *putc = putc_ns9360;108108- *base = NS9360_UARTD;109109- return;110110- } else if (__raw_readl(__REG(0xa09001f4)) == 0xfffff001) {111111- *putc = putc_a9m9750dev;112112- *base = A9M9750DEV_UARTA;113113- return;114114- }115115- } else if (((__raw_readl(MSCS) >> 16) & 0xfe) == 0x02) {116116- /* ns921x */117117- u32 clock = __raw_readl(NS921XSYS_CLOCK);118118-119119- if ((clock & (1 << 1)) &&120120- NS921X_UART_ENABLED(NS921X_UARTA)) {121121- *putc = putc_ns921x;122122- *base = NS921X_UARTA;123123- return;124124- } else if ((clock & (1 << 2)) &&125125- NS921X_UART_ENABLED(NS921X_UARTB)) {126126- *putc = putc_ns921x;127127- *base = NS921X_UARTB;128128- return;129129- } else if ((clock & (1 << 3)) &&130130- NS921X_UART_ENABLED(NS921X_UARTC)) {131131- *putc = putc_ns921x;132132- *base = NS921X_UARTC;133133- return;134134- } else if ((clock & (1 << 4)) &&135135- NS921X_UART_ENABLED(NS921X_UARTD)) {136136- *putc = putc_ns921x;137137- *base = NS921X_UARTD;138138- return;139139- }140140- }141141-142142- *putc = putc_dummy;143143-}144144-145145-void (*myputc)(char, void __iomem *);146146-void __iomem *base;147147-148148-static void putc(char c)149149-{150150- myputc(c, base);151151-}152152-153153-static void arch_decomp_setup(void)154154-{155155- autodetect(&myputc, &base);156156-}157157-#define arch_decomp_wdog()158158-159159-static void flush(void)160160-{161161- /* nothing */162162-}163163-164164-#endif /* ifndef __ASM_ARCH_UNCOMPRESS_H */
-16
arch/arm/mach-ns9xxx/include/mach/vmalloc.h
···11-/*22- * arch/arm/mach-ns9xxx/include/mach/vmalloc.h33- *44- * Copyright (C) 2006 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#ifndef __ASM_ARCH_VMALLOC_H1212-#define __ASM_ARCH_VMALLOC_H1313-1414-#define VMALLOC_END (0xf0000000UL)1515-1616-#endif /* ifndef __ASM_ARCH_VMALLOC_H */
-74
arch/arm/mach-ns9xxx/irq.c
···11-/*22- * arch/arm/mach-ns9xxx/irq.c33- *44- * Copyright (C) 2006,2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#include <linux/interrupt.h>1212-#include <linux/kernel_stat.h>1313-#include <linux/io.h>1414-#include <asm/mach/irq.h>1515-#include <mach/regs-sys-common.h>1616-#include <mach/irqs.h>1717-#include <mach/board.h>1818-1919-#include "generic.h"2020-2121-/* simple interrupt prio table: prio(x) < prio(y) <=> x < y */2222-#define irq2prio(i) (i)2323-#define prio2irq(p) (p)2424-2525-static void ns9xxx_mask_irq(struct irq_data *d)2626-{2727- /* XXX: better use cpp symbols */2828- int prio = irq2prio(d->irq);2929- u32 ic = __raw_readl(SYS_IC(prio / 4));3030- ic &= ~(1 << (7 + 8 * (3 - (prio & 3))));3131- __raw_writel(ic, SYS_IC(prio / 4));3232-}3333-3434-static void ns9xxx_eoi_irq(struct irq_data *d)3535-{3636- __raw_writel(0, SYS_ISRADDR);3737-}3838-3939-static void ns9xxx_unmask_irq(struct irq_data *d)4040-{4141- /* XXX: better use cpp symbols */4242- int prio = irq2prio(d->irq);4343- u32 ic = __raw_readl(SYS_IC(prio / 4));4444- ic |= 1 << (7 + 8 * (3 - (prio & 3)));4545- __raw_writel(ic, SYS_IC(prio / 4));4646-}4747-4848-static struct irq_chip ns9xxx_chip = {4949- .irq_eoi = ns9xxx_eoi_irq,5050- .irq_mask = ns9xxx_mask_irq,5151- .irq_unmask = ns9xxx_unmask_irq,5252-};5353-5454-void __init ns9xxx_init_irq(void)5555-{5656- int i;5757-5858- /* disable all IRQs */5959- for (i = 0; i < 8; ++i)6060- __raw_writel(prio2irq(4 * i) << 24 |6161- prio2irq(4 * i + 1) << 16 |6262- prio2irq(4 * i + 2) << 8 |6363- prio2irq(4 * i + 3),6464- SYS_IC(i));6565-6666- for (i = 0; i < 32; ++i)6767- __raw_writel(prio2irq(i), SYS_IVA(i));6868-6969- for (i = 0; i <= 31; ++i) {7070- irq_set_chip_and_handler(i, &ns9xxx_chip, handle_fasteoi_irq);7171- set_irq_flags(i, IRQF_VALID);7272- irq_set_status_flags(i, IRQ_LEVEL);7373- }7474-}
-43
arch/arm/mach-ns9xxx/mach-cc9p9360dev.c
···11-/*22- * arch/arm/mach-ns9xxx/mach-cc9p9360dev.c33- *44- * Copyright (C) 2006,2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#include <asm/mach/arch.h>1212-#include <asm/mach-types.h>1313-1414-#include <mach/processor-ns9360.h>1515-1616-#include "board-a9m9750dev.h"1717-#include "generic.h"1818-1919-static void __init mach_cc9p9360dev_map_io(void)2020-{2121- ns9360_map_io();2222- board_a9m9750dev_map_io();2323-}2424-2525-static void __init mach_cc9p9360dev_init_irq(void)2626-{2727- ns9xxx_init_irq();2828- board_a9m9750dev_init_irq();2929-}3030-3131-static void __init mach_cc9p9360dev_init_machine(void)3232-{3333- ns9xxx_init_machine();3434- board_a9m9750dev_init_machine();3535-}3636-3737-MACHINE_START(CC9P9360DEV, "Digi ConnectCore 9P 9360 on an A9M9750 Devboard")3838- .map_io = mach_cc9p9360dev_map_io,3939- .init_irq = mach_cc9p9360dev_init_irq,4040- .init_machine = mach_cc9p9360dev_init_machine,4141- .timer = &ns9360_timer,4242- .boot_params = 0x100,4343-MACHINE_END
-31
arch/arm/mach-ns9xxx/mach-cc9p9360js.c
···11-/*22- * arch/arm/mach-ns9xxx/mach-cc9p9360js.c33- *44- * Copyright (C) 2006,2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#include <asm/mach/arch.h>1212-#include <asm/mach-types.h>1313-1414-#include <mach/processor-ns9360.h>1515-1616-#include "board-jscc9p9360.h"1717-#include "generic.h"1818-1919-static void __init mach_cc9p9360js_init_machine(void)2020-{2121- ns9xxx_init_machine();2222- board_jscc9p9360_init_machine();2323-}2424-2525-MACHINE_START(CC9P9360JS, "Digi ConnectCore 9P 9360 on an JSCC9P9360 Devboard")2626- .map_io = ns9360_map_io,2727- .init_irq = ns9xxx_init_irq,2828- .init_machine = mach_cc9p9360js_init_machine,2929- .timer = &ns9360_timer,3030- .boot_params = 0x100,3131-MACHINE_END
-70
arch/arm/mach-ns9xxx/plat-serial8250.c
···11-/*22- * arch/arm/mach-ns9xxx/plat-serial8250.c33- *44- * Copyright (C) 2008 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#include <linux/platform_device.h>1212-#include <linux/serial_8250.h>1313-#include <linux/slab.h>1414-1515-#include <mach/regs-board-a9m9750dev.h>1616-#include <mach/board.h>1717-1818-#define DRIVER_NAME "serial8250"1919-2020-static int __init ns9xxx_plat_serial8250_init(void)2121-{2222- struct plat_serial8250_port *pdata;2323- struct platform_device *pdev;2424- int ret = -ENOMEM;2525- int i;2626-2727- if (!board_is_a9m9750dev())2828- return -ENODEV;2929-3030- pdev = platform_device_alloc(DRIVER_NAME, 0);3131- if (!pdev)3232- goto err;3333-3434- pdata = kzalloc(5 * sizeof(*pdata), GFP_KERNEL);3535- if (!pdata)3636- goto err;3737-3838- pdev->dev.platform_data = pdata;3939-4040- pdata[0].iobase = FPGA_UARTA_BASE;4141- pdata[1].iobase = FPGA_UARTB_BASE;4242- pdata[2].iobase = FPGA_UARTC_BASE;4343- pdata[3].iobase = FPGA_UARTD_BASE;4444-4545- for (i = 0; i < 4; ++i) {4646- pdata[i].membase = (void __iomem *)pdata[i].iobase;4747- pdata[i].mapbase = pdata[i].iobase;4848- pdata[i].iotype = UPIO_MEM;4949- pdata[i].uartclk = 18432000;5050- pdata[i].flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ;5151- }5252-5353- pdata[0].irq = IRQ_FPGA_UARTA;5454- pdata[1].irq = IRQ_FPGA_UARTB;5555- pdata[2].irq = IRQ_FPGA_UARTC;5656- pdata[3].irq = IRQ_FPGA_UARTD;5757-5858- ret = platform_device_add(pdev);5959- if (ret) {6060-err:6161- platform_device_put(pdev);6262-6363- printk(KERN_WARNING "Could not add %s (errno=%d)\n",6464- DRIVER_NAME, ret);6565- }6666-6767- return 0;6868-}6969-7070-arch_initcall(ns9xxx_plat_serial8250_init);
-53
arch/arm/mach-ns9xxx/processor-ns9360.c
···11-/*22- * arch/arm/mach-ns9xxx/processor-ns9360.c33- *44- * Copyright (C) 2007 by Digi International Inc.55- * All rights reserved.66- *77- * This program is free software; you can redistribute it and/or modify it88- * under the terms of the GNU General Public License version 2 as published by99- * the Free Software Foundation.1010- */1111-#include <linux/io.h>1212-#include <linux/kernel.h>1313-1414-#include <asm/page.h>1515-#include <asm/mach/map.h>1616-#include <mach/processor-ns9360.h>1717-#include <mach/regs-sys-ns9360.h>1818-1919-void ns9360_reset(char mode)2020-{2121- u32 reg;2222-2323- reg = __raw_readl(SYS_PLL) >> 16;2424- REGSET(reg, SYS_PLL, SWC, YES);2525- __raw_writel(reg, SYS_PLL);2626-}2727-2828-#define CRYSTAL 29491200 /* Hz */2929-unsigned long ns9360_systemclock(void)3030-{3131- u32 pll = __raw_readl(SYS_PLL);3232- return CRYSTAL * (REGGETIM(pll, SYS_PLL, ND) + 1)3333- >> REGGETIM(pll, SYS_PLL, FS);3434-}3535-3636-static struct map_desc ns9360_io_desc[] __initdata = {3737- { /* BBus */3838- .virtual = io_p2v(0x90000000),3939- .pfn = __phys_to_pfn(0x90000000),4040- .length = 0x00700000,4141- .type = MT_DEVICE,4242- }, { /* AHB */4343- .virtual = io_p2v(0xa0100000),4444- .pfn = __phys_to_pfn(0xa0100000),4545- .length = 0x00900000,4646- .type = MT_DEVICE,4747- },4848-};4949-5050-void __init ns9360_map_io(void)5151-{5252- iotable_init(ns9360_io_desc, ARRAY_SIZE(ns9360_io_desc));5353-}
···148148 iotable_init(spear6xx_io_desc, ARRAY_SIZE(spear6xx_io_desc));149149150150 /* This will initialize clock framework */151151- clk_init();151151+ spear6xx_clk_init();152152}153153154154static void __init spear6xx_timer_init(void)
+4-3
arch/arm/mm/flush.c
···253253254254 if (!test_and_set_bit(PG_dcache_clean, &page->flags))255255 __flush_dcache_page(mapping, page);256256- /* pte_exec() already checked above for non-aliasing VIPT cache */257257- if (cache_is_vipt_nonaliasing() || pte_exec(pteval))256256+257257+ if (pte_exec(pteval))258258 __flush_icache_all();259259}260260#endif···275275 * kernel cache lines for later. Otherwise, we assume we have276276 * aliasing mappings.277277 *278278- * Note that we disable the lazy flush for SMP.278278+ * Note that we disable the lazy flush for SMP configurations where279279+ * the cache maintenance operations are not automatically broadcasted.279280 */280281void flush_dcache_page(struct page *page)281282{
+5
arch/arm/plat-spear/clock.c
···903903 spin_unlock_irqrestore(&clocks_lock, flags);904904}905905906906+void __init clk_init(void)907907+{908908+ recalc_root_clocks();909909+}910910+906911#ifdef CONFIG_DEBUG_FS907912/*908913 * debugfs support to trace clock tree hierarchy and attributes