Loading arch/arm/common/sa1111.c +0 −59 Original line number Diff line number Diff line Loading @@ -1282,65 +1282,6 @@ int sa1111_get_audio_rate(struct sa1111_dev *sadev) } EXPORT_SYMBOL(sa1111_get_audio_rate); void sa1111_set_io_dir(struct sa1111_dev *sadev, unsigned int bits, unsigned int dir, unsigned int sleep_dir) { struct sa1111 *sachip = sa1111_chip_driver(sadev); unsigned long flags; unsigned int val; void __iomem *gpio = sachip->base + SA1111_GPIO; #define MODIFY_BITS(port, mask, dir) \ if (mask) { \ val = readl_relaxed(port); \ val &= ~(mask); \ val |= (dir) & (mask); \ writel_relaxed(val, port); \ } spin_lock_irqsave(&sachip->lock, flags); MODIFY_BITS(gpio + SA1111_GPIO_PADDR, bits & 15, dir); MODIFY_BITS(gpio + SA1111_GPIO_PBDDR, (bits >> 8) & 255, dir >> 8); MODIFY_BITS(gpio + SA1111_GPIO_PCDDR, (bits >> 16) & 255, dir >> 16); MODIFY_BITS(gpio + SA1111_GPIO_PASDR, bits & 15, sleep_dir); MODIFY_BITS(gpio + SA1111_GPIO_PBSDR, (bits >> 8) & 255, sleep_dir >> 8); MODIFY_BITS(gpio + SA1111_GPIO_PCSDR, (bits >> 16) & 255, sleep_dir >> 16); spin_unlock_irqrestore(&sachip->lock, flags); } EXPORT_SYMBOL(sa1111_set_io_dir); void sa1111_set_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v) { struct sa1111 *sachip = sa1111_chip_driver(sadev); unsigned long flags; unsigned int val; void __iomem *gpio = sachip->base + SA1111_GPIO; spin_lock_irqsave(&sachip->lock, flags); MODIFY_BITS(gpio + SA1111_GPIO_PADWR, bits & 15, v); MODIFY_BITS(gpio + SA1111_GPIO_PBDWR, (bits >> 8) & 255, v >> 8); MODIFY_BITS(gpio + SA1111_GPIO_PCDWR, (bits >> 16) & 255, v >> 16); spin_unlock_irqrestore(&sachip->lock, flags); } EXPORT_SYMBOL(sa1111_set_io); void sa1111_set_sleep_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v) { struct sa1111 *sachip = sa1111_chip_driver(sadev); unsigned long flags; unsigned int val; void __iomem *gpio = sachip->base + SA1111_GPIO; spin_lock_irqsave(&sachip->lock, flags); MODIFY_BITS(gpio + SA1111_GPIO_PASSR, bits & 15, v); MODIFY_BITS(gpio + SA1111_GPIO_PBSSR, (bits >> 8) & 255, v >> 8); MODIFY_BITS(gpio + SA1111_GPIO_PCSSR, (bits >> 16) & 255, v >> 16); spin_unlock_irqrestore(&sachip->lock, flags); } EXPORT_SYMBOL(sa1111_set_sleep_io); /* * Individual device operations. */ Loading arch/arm/include/asm/cputype.h +1 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ #include <linux/kernel.h> extern unsigned int processor_id; struct proc_info_list *lookup_processor(u32 midr); #ifdef CONFIG_CPU_CP15 #define read_cpuid(reg) \ Loading arch/arm/include/asm/hardware/sa1111.h +0 −4 Original line number Diff line number Diff line Loading @@ -433,10 +433,6 @@ int sa1111_check_dma_bug(dma_addr_t addr); int sa1111_driver_register(struct sa1111_driver *); void sa1111_driver_unregister(struct sa1111_driver *); void sa1111_set_io_dir(struct sa1111_dev *sadev, unsigned int bits, unsigned int dir, unsigned int sleep_dir); void sa1111_set_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v); void sa1111_set_sleep_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v); struct sa1111_platform_data { int irq_base; /* base for cascaded on-chip IRQs */ unsigned disable_devs; Loading arch/arm/include/asm/proc-fns.h +49 −12 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ struct mm_struct; /* * Don't change this structure - ASM code relies on it. */ extern struct processor { struct processor { /* MISC * get data abort address/flags */ Loading Loading @@ -79,9 +79,13 @@ extern struct processor { unsigned int suspend_size; void (*do_suspend)(void *); void (*do_resume)(void *); } processor; }; #ifndef MULTI_CPU static inline void init_proc_vtable(const struct processor *p) { } extern void cpu_proc_init(void); extern void cpu_proc_fin(void); extern int cpu_do_idle(void); Loading @@ -98,17 +102,50 @@ extern void cpu_reset(unsigned long addr, bool hvc) __attribute__((noreturn)); extern void cpu_do_suspend(void *); extern void cpu_do_resume(void *); #else #define cpu_proc_init processor._proc_init #define cpu_proc_fin processor._proc_fin #define cpu_reset processor.reset #define cpu_do_idle processor._do_idle #define cpu_dcache_clean_area processor.dcache_clean_area #define cpu_set_pte_ext processor.set_pte_ext #define cpu_do_switch_mm processor.switch_mm /* These three are private to arch/arm/kernel/suspend.c */ #define cpu_do_suspend processor.do_suspend #define cpu_do_resume processor.do_resume extern struct processor processor; #if defined(CONFIG_BIG_LITTLE) && defined(CONFIG_HARDEN_BRANCH_PREDICTOR) #include <linux/smp.h> /* * This can't be a per-cpu variable because we need to access it before * per-cpu has been initialised. We have a couple of functions that are * called in a pre-emptible context, and so can't use smp_processor_id() * there, hence PROC_TABLE(). We insist in init_proc_vtable() that the * function pointers for these are identical across all CPUs. */ extern struct processor *cpu_vtable[]; #define PROC_VTABLE(f) cpu_vtable[smp_processor_id()]->f #define PROC_TABLE(f) cpu_vtable[0]->f static inline void init_proc_vtable(const struct processor *p) { unsigned int cpu = smp_processor_id(); *cpu_vtable[cpu] = *p; WARN_ON_ONCE(cpu_vtable[cpu]->dcache_clean_area != cpu_vtable[0]->dcache_clean_area); WARN_ON_ONCE(cpu_vtable[cpu]->set_pte_ext != cpu_vtable[0]->set_pte_ext); } #else #define PROC_VTABLE(f) processor.f #define PROC_TABLE(f) processor.f static inline void init_proc_vtable(const struct processor *p) { processor = *p; } #endif #define cpu_proc_init PROC_VTABLE(_proc_init) #define cpu_check_bugs PROC_VTABLE(check_bugs) #define cpu_proc_fin PROC_VTABLE(_proc_fin) #define cpu_reset PROC_VTABLE(reset) #define cpu_do_idle PROC_VTABLE(_do_idle) #define cpu_dcache_clean_area PROC_TABLE(dcache_clean_area) #define cpu_set_pte_ext PROC_TABLE(set_pte_ext) #define cpu_do_switch_mm PROC_VTABLE(switch_mm) /* These two are private to arch/arm/kernel/suspend.c */ #define cpu_do_suspend PROC_VTABLE(do_suspend) #define cpu_do_resume PROC_VTABLE(do_resume) #endif extern void cpu_resume(void); Loading arch/arm/kernel/bugs.c +2 −2 Original line number Diff line number Diff line Loading @@ -6,8 +6,8 @@ void check_other_bugs(void) { #ifdef MULTI_CPU if (processor.check_bugs) processor.check_bugs(); if (cpu_check_bugs) cpu_check_bugs(); #endif } Loading Loading
arch/arm/common/sa1111.c +0 −59 Original line number Diff line number Diff line Loading @@ -1282,65 +1282,6 @@ int sa1111_get_audio_rate(struct sa1111_dev *sadev) } EXPORT_SYMBOL(sa1111_get_audio_rate); void sa1111_set_io_dir(struct sa1111_dev *sadev, unsigned int bits, unsigned int dir, unsigned int sleep_dir) { struct sa1111 *sachip = sa1111_chip_driver(sadev); unsigned long flags; unsigned int val; void __iomem *gpio = sachip->base + SA1111_GPIO; #define MODIFY_BITS(port, mask, dir) \ if (mask) { \ val = readl_relaxed(port); \ val &= ~(mask); \ val |= (dir) & (mask); \ writel_relaxed(val, port); \ } spin_lock_irqsave(&sachip->lock, flags); MODIFY_BITS(gpio + SA1111_GPIO_PADDR, bits & 15, dir); MODIFY_BITS(gpio + SA1111_GPIO_PBDDR, (bits >> 8) & 255, dir >> 8); MODIFY_BITS(gpio + SA1111_GPIO_PCDDR, (bits >> 16) & 255, dir >> 16); MODIFY_BITS(gpio + SA1111_GPIO_PASDR, bits & 15, sleep_dir); MODIFY_BITS(gpio + SA1111_GPIO_PBSDR, (bits >> 8) & 255, sleep_dir >> 8); MODIFY_BITS(gpio + SA1111_GPIO_PCSDR, (bits >> 16) & 255, sleep_dir >> 16); spin_unlock_irqrestore(&sachip->lock, flags); } EXPORT_SYMBOL(sa1111_set_io_dir); void sa1111_set_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v) { struct sa1111 *sachip = sa1111_chip_driver(sadev); unsigned long flags; unsigned int val; void __iomem *gpio = sachip->base + SA1111_GPIO; spin_lock_irqsave(&sachip->lock, flags); MODIFY_BITS(gpio + SA1111_GPIO_PADWR, bits & 15, v); MODIFY_BITS(gpio + SA1111_GPIO_PBDWR, (bits >> 8) & 255, v >> 8); MODIFY_BITS(gpio + SA1111_GPIO_PCDWR, (bits >> 16) & 255, v >> 16); spin_unlock_irqrestore(&sachip->lock, flags); } EXPORT_SYMBOL(sa1111_set_io); void sa1111_set_sleep_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v) { struct sa1111 *sachip = sa1111_chip_driver(sadev); unsigned long flags; unsigned int val; void __iomem *gpio = sachip->base + SA1111_GPIO; spin_lock_irqsave(&sachip->lock, flags); MODIFY_BITS(gpio + SA1111_GPIO_PASSR, bits & 15, v); MODIFY_BITS(gpio + SA1111_GPIO_PBSSR, (bits >> 8) & 255, v >> 8); MODIFY_BITS(gpio + SA1111_GPIO_PCSSR, (bits >> 16) & 255, v >> 16); spin_unlock_irqrestore(&sachip->lock, flags); } EXPORT_SYMBOL(sa1111_set_sleep_io); /* * Individual device operations. */ Loading
arch/arm/include/asm/cputype.h +1 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ #include <linux/kernel.h> extern unsigned int processor_id; struct proc_info_list *lookup_processor(u32 midr); #ifdef CONFIG_CPU_CP15 #define read_cpuid(reg) \ Loading
arch/arm/include/asm/hardware/sa1111.h +0 −4 Original line number Diff line number Diff line Loading @@ -433,10 +433,6 @@ int sa1111_check_dma_bug(dma_addr_t addr); int sa1111_driver_register(struct sa1111_driver *); void sa1111_driver_unregister(struct sa1111_driver *); void sa1111_set_io_dir(struct sa1111_dev *sadev, unsigned int bits, unsigned int dir, unsigned int sleep_dir); void sa1111_set_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v); void sa1111_set_sleep_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v); struct sa1111_platform_data { int irq_base; /* base for cascaded on-chip IRQs */ unsigned disable_devs; Loading
arch/arm/include/asm/proc-fns.h +49 −12 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ struct mm_struct; /* * Don't change this structure - ASM code relies on it. */ extern struct processor { struct processor { /* MISC * get data abort address/flags */ Loading Loading @@ -79,9 +79,13 @@ extern struct processor { unsigned int suspend_size; void (*do_suspend)(void *); void (*do_resume)(void *); } processor; }; #ifndef MULTI_CPU static inline void init_proc_vtable(const struct processor *p) { } extern void cpu_proc_init(void); extern void cpu_proc_fin(void); extern int cpu_do_idle(void); Loading @@ -98,17 +102,50 @@ extern void cpu_reset(unsigned long addr, bool hvc) __attribute__((noreturn)); extern void cpu_do_suspend(void *); extern void cpu_do_resume(void *); #else #define cpu_proc_init processor._proc_init #define cpu_proc_fin processor._proc_fin #define cpu_reset processor.reset #define cpu_do_idle processor._do_idle #define cpu_dcache_clean_area processor.dcache_clean_area #define cpu_set_pte_ext processor.set_pte_ext #define cpu_do_switch_mm processor.switch_mm /* These three are private to arch/arm/kernel/suspend.c */ #define cpu_do_suspend processor.do_suspend #define cpu_do_resume processor.do_resume extern struct processor processor; #if defined(CONFIG_BIG_LITTLE) && defined(CONFIG_HARDEN_BRANCH_PREDICTOR) #include <linux/smp.h> /* * This can't be a per-cpu variable because we need to access it before * per-cpu has been initialised. We have a couple of functions that are * called in a pre-emptible context, and so can't use smp_processor_id() * there, hence PROC_TABLE(). We insist in init_proc_vtable() that the * function pointers for these are identical across all CPUs. */ extern struct processor *cpu_vtable[]; #define PROC_VTABLE(f) cpu_vtable[smp_processor_id()]->f #define PROC_TABLE(f) cpu_vtable[0]->f static inline void init_proc_vtable(const struct processor *p) { unsigned int cpu = smp_processor_id(); *cpu_vtable[cpu] = *p; WARN_ON_ONCE(cpu_vtable[cpu]->dcache_clean_area != cpu_vtable[0]->dcache_clean_area); WARN_ON_ONCE(cpu_vtable[cpu]->set_pte_ext != cpu_vtable[0]->set_pte_ext); } #else #define PROC_VTABLE(f) processor.f #define PROC_TABLE(f) processor.f static inline void init_proc_vtable(const struct processor *p) { processor = *p; } #endif #define cpu_proc_init PROC_VTABLE(_proc_init) #define cpu_check_bugs PROC_VTABLE(check_bugs) #define cpu_proc_fin PROC_VTABLE(_proc_fin) #define cpu_reset PROC_VTABLE(reset) #define cpu_do_idle PROC_VTABLE(_do_idle) #define cpu_dcache_clean_area PROC_TABLE(dcache_clean_area) #define cpu_set_pte_ext PROC_TABLE(set_pte_ext) #define cpu_do_switch_mm PROC_VTABLE(switch_mm) /* These two are private to arch/arm/kernel/suspend.c */ #define cpu_do_suspend PROC_VTABLE(do_suspend) #define cpu_do_resume PROC_VTABLE(do_resume) #endif extern void cpu_resume(void); Loading
arch/arm/kernel/bugs.c +2 −2 Original line number Diff line number Diff line Loading @@ -6,8 +6,8 @@ void check_other_bugs(void) { #ifdef MULTI_CPU if (processor.check_bugs) processor.check_bugs(); if (cpu_check_bugs) cpu_check_bugs(); #endif } Loading