Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sh: migrate to arch/sh/include/

This follows the sparc changes a439fe51a1f8eb087c22dd24d69cebae4a3addac.

Most of the moving about was done with Sam's directions at:

http://marc.info/?l=linux-sh&m=121724823706062&w=2

with subsequent hacking and fixups entirely my fault.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

+1687 -1550
+8 -53
arch/sh/Makefile
··· 91 91 LDFLAGS += -EB 92 92 endif 93 93 94 - KBUILD_CFLAGS += -pipe $(cflags-y) 95 - KBUILD_AFLAGS += $(cflags-y) 96 94 97 95 head-y := arch/sh/kernel/init_task.o 98 96 head-$(CONFIG_SUPERH32) += arch/sh/kernel/head_32.o ··· 158 160 159 161 boot := arch/sh/boot 160 162 161 - ifneq ($(KBUILD_SRC),) 162 - incdir-prefix := $(srctree)/include/asm-sh/ 163 - else 164 - incdir-prefix := 165 - endif 163 + cflags-y += -Iarch/sh/include/$(cpuincdir-y) 164 + cflags-y += $(foreach d, $(incdir-y), -Iarch/sh/include/mach-$(d)) 166 165 167 - # Update machine arch and proc symlinks if something which affects 168 - # them changed. We use .arch and .mach to indicate when they were 169 - # updated last, otherwise make uses the target directory mtime. 170 - 171 - include/asm-sh/.cpu: $(wildcard include/config/cpu/*.h) \ 172 - include/config/auto.conf FORCE 173 - @echo ' SYMLINK include/asm-sh/cpu -> include/asm-sh/$(cpuincdir-y)' 174 - $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi 175 - $(Q)ln -fsn $(incdir-prefix)$(cpuincdir-y) include/asm-sh/cpu 176 - @touch $@ 177 - 178 - # Most boards have their own mach directories. For the ones that 179 - # don't, just reference the parent directory so the semantics are 180 - # kept roughly the same. 181 - # 182 - # When multiple boards are compiled in at the same time, preference 183 - # for the mach link is given to whichever has a directory for its 184 - # headers. However, this is only a workaround until platforms that 185 - # can live in the same kernel image back away from relying on the 186 - # mach link. 187 - 188 - include/asm-sh/.mach: $(wildcard include/config/sh/*.h) \ 189 - include/config/auto.conf FORCE 190 - $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi 191 - $(Q)rm -f include/asm-sh/mach 192 - $(Q)for i in $(incdir-y); do \ 193 - if [ -d $(srctree)/include/asm-sh/$$i ]; then \ 194 - echo -n ' SYMLINK include/asm-sh/mach -> '; \ 195 - echo -e "include/asm-sh/$$i"; \ 196 - ln -fsn $(incdir-prefix)$$i \ 197 - include/asm-sh/mach; \ 198 - else \ 199 - if [ ! -d include/asm-sh/mach ]; then \ 200 - echo -n ' SYMLINK include/asm-sh/mach -> '; \ 201 - echo -e 'include/asm-sh'; \ 202 - ln -fsn $(incdir-prefix)../asm-sh include/asm-sh/mach; \ 203 - fi; \ 204 - fi; \ 205 - done 206 - @touch $@ 166 + KBUILD_CFLAGS += -pipe $(cflags-y) 167 + KBUILD_CPPFLAGS += $(cflags-y) 168 + KBUILD_AFLAGS += $(cflags-y) 207 169 208 170 PHONY += maketools FORCE 209 171 210 172 maketools: include/linux/version.h FORCE 211 - $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h 173 + $(Q)$(MAKE) $(build)=arch/sh/tools arch/sh/include/asm/machtypes.h 212 174 213 175 all: $(KBUILD_IMAGE) 214 176 ··· 177 219 178 220 compressed: zImage 179 221 180 - archprepare: include/asm-sh/.cpu include/asm-sh/.mach maketools \ 181 - arch/sh/lib64/syscalltab.h 222 + archprepare: maketools arch/sh/lib64/syscalltab.h 182 223 183 224 archclean: 184 225 $(Q)$(MAKE) $(clean)=$(boot) ··· 219 262 $(call filechk,gen-syscalltab) 220 263 221 264 CLEAN_FILES += arch/sh/lib64/syscalltab.h \ 222 - include/asm-sh/machtypes.h \ 223 - include/asm-sh/cpu include/asm-sh/.cpu \ 224 - include/asm-sh/mach include/asm-sh/.mach 265 + arch/sh/include/asm/machtypes.h
+1 -1
arch/sh/boards/cayman/irq.c
··· 13 13 #include <linux/irq.h> 14 14 #include <linux/interrupt.h> 15 15 #include <linux/signal.h> 16 - #include <asm/cpu/irq.h> 16 + #include <cpu/irq.h> 17 17 #include <asm/page.h> 18 18 19 19 /* Setup for the SMSC FDC37C935 / LAN91C100FD */
+1 -1
arch/sh/boards/cayman/setup.c
··· 13 13 #include <linux/init.h> 14 14 #include <linux/io.h> 15 15 #include <linux/kernel.h> 16 - #include <asm/cpu/irq.h> 16 + #include <cpu/irq.h> 17 17 18 18 /* 19 19 * Platform Dependent Interrupt Priorities.
+1 -1
arch/sh/boards/dreamcast/irq.c
··· 12 12 #include <linux/irq.h> 13 13 #include <asm/io.h> 14 14 #include <asm/irq.h> 15 - #include <asm/dreamcast/sysasic.h> 15 + #include <mach/sysasic.h> 16 16 17 17 /* Dreamcast System ASIC Hardware Events - 18 18
+2 -2
arch/sh/boards/dreamcast/setup.c
··· 25 25 #include <asm/io.h> 26 26 #include <asm/irq.h> 27 27 #include <asm/rtc.h> 28 - #include <asm/machvec.h> 29 - #include <asm/mach/sysasic.h> 28 + #include <machvec.h> 29 + #include <mach/sysasic.h> 30 30 31 31 extern struct hw_interrupt_type systemasic_int; 32 32 extern void aica_time_init(void);
+1 -1
arch/sh/boards/hp6xx/pm.c
··· 13 13 #include <asm/io.h> 14 14 #include <asm/hd64461.h> 15 15 #include <asm/hp6xx.h> 16 - #include <asm/cpu/dac.h> 16 + #include <cpu/dac.h> 17 17 #include <asm/pm.h> 18 18 19 19 #define STBCR 0xffffff82
+1 -1
arch/sh/boards/hp6xx/pm_wakeup.S
··· 8 8 */ 9 9 10 10 #include <linux/linkage.h> 11 - #include <asm/cpu/mmu_context.h> 11 + #include <cpu/mmu_context.h> 12 12 13 13 #define k0 r0 14 14 #define k1 r1
+1 -1
arch/sh/boards/hp6xx/setup.c
··· 16 16 #include <asm/io.h> 17 17 #include <asm/irq.h> 18 18 #include <asm/hp6xx.h> 19 - #include <asm/cpu/dac.h> 19 + #include <cpu/dac.h> 20 20 21 21 #define SCPCR 0xa4000116 22 22 #define SCPDR 0xa4000136
+2 -2
arch/sh/boards/landisk/gio.c
··· 20 20 #include <linux/fs.h> 21 21 #include <asm/io.h> 22 22 #include <asm/uaccess.h> 23 - #include <asm/landisk/gio.h> 24 - #include <asm/landisk/iodata_landisk.h> 23 + #include <mach/gio.h> 24 + #include <mach/iodata_landisk.h> 25 25 26 26 #define DEVCOUNT 4 27 27 #define GIO_MINOR 2 /* GIO minor no. */
+1 -1
arch/sh/boards/landisk/irq.c
··· 16 16 #include <linux/irq.h> 17 17 #include <linux/interrupt.h> 18 18 #include <linux/io.h> 19 - #include <asm/landisk/iodata_landisk.h> 19 + #include <mach/iodata_landisk.h> 20 20 21 21 static void disable_landisk_irq(unsigned int irq) 22 22 {
+1 -1
arch/sh/boards/landisk/psw.c
··· 14 14 #include <linux/init.h> 15 15 #include <linux/interrupt.h> 16 16 #include <linux/platform_device.h> 17 - #include <asm/landisk/iodata_landisk.h> 17 + #include <mach/iodata_landisk.h> 18 18 #include <asm/push-switch.h> 19 19 20 20 static irqreturn_t psw_irq_handler(int irq, void *arg)
+1 -1
arch/sh/boards/landisk/setup.c
··· 18 18 #include <linux/pm.h> 19 19 #include <linux/mm.h> 20 20 #include <asm/machvec.h> 21 - #include <asm/landisk/iodata_landisk.h> 21 + #include <mach/iodata_landisk.h> 22 22 #include <asm/io.h> 23 23 24 24 void init_landisk_IRQ(void);
+1 -1
arch/sh/boards/renesas/r7780rp/psw.c
··· 13 13 #include <linux/init.h> 14 14 #include <linux/interrupt.h> 15 15 #include <linux/platform_device.h> 16 - #include <asm/mach/r7780rp.h> 16 + #include <mach/r7780rp.h> 17 17 #include <asm/push-switch.h> 18 18 19 19 static irqreturn_t psw_irq_handler(int irq, void *arg)
+1 -1
arch/sh/boards/se/7343/io.c
··· 6 6 */ 7 7 #include <linux/kernel.h> 8 8 #include <asm/io.h> 9 - #include <asm/mach/se7343.h> 9 + #include <mach/se7343.h> 10 10 11 11 #define badio(fn, a) panic("bad i/o operation %s for %08lx.", #fn, a) 12 12
+2 -2
arch/sh/boards/se/7343/setup.c
··· 1 1 #include <linux/init.h> 2 2 #include <linux/platform_device.h> 3 3 #include <linux/mtd/physmap.h> 4 - #include <asm/machvec.h> 5 - #include <asm/mach/se7343.h> 4 + #include <machvec.h> 5 + #include <mach/se7343.h> 6 6 #include <asm/heartbeat.h> 7 7 #include <asm/irq.h> 8 8 #include <asm/io.h>
+2 -2
arch/sh/boards/sh03/setup.c
··· 11 11 #include <linux/platform_device.h> 12 12 #include <asm/io.h> 13 13 #include <asm/rtc.h> 14 - #include <asm/sh03/io.h> 15 - #include <asm/sh03/sh03.h> 14 + #include <mach/io.h> 15 + #include <mach/sh03.h> 16 16 #include <asm/addrspace.h> 17 17 18 18 static void __init init_sh03_IRQ(void)
+1 -1
arch/sh/boards/snapgear/setup.c
··· 22 22 #include <asm/snapgear.h> 23 23 #include <asm/irq.h> 24 24 #include <asm/io.h> 25 - #include <asm/cpu/timer.h> 25 + #include <cpu/timer.h> 26 26 27 27 /* 28 28 * EraseConfig handling functions
+2 -2
arch/sh/boot/compressed/head_64.S
··· 14 14 * Copyright (C) 2002 Stuart Menefy (stuart.menefy@st.com) 15 15 */ 16 16 #include <asm/cache.h> 17 - #include <asm/cpu/mmu_context.h> 18 - #include <asm/cpu/registers.h> 17 + #include <cpu/mmu_context.h> 18 + #include <cpu/registers.h> 19 19 20 20 /* 21 21 * Fixed TLB entries to identity map the beginning of RAM
+2 -2
arch/sh/drivers/dma/dma-g2.c
··· 14 14 #include <linux/module.h> 15 15 #include <linux/interrupt.h> 16 16 #include <asm/cacheflush.h> 17 - #include <asm/mach/sysasic.h> 18 - #include <asm/mach/dma.h> 17 + #include <mach/sysasic.h> 18 + #include <mach/dma.h> 19 19 #include <asm/dma.h> 20 20 21 21 struct g2_channel {
+2 -2
arch/sh/drivers/dma/dma-pvr2.c
··· 13 13 #include <linux/kernel.h> 14 14 #include <linux/module.h> 15 15 #include <linux/interrupt.h> 16 - #include <asm/mach/sysasic.h> 17 - #include <asm/mach/dma.h> 16 + #include <mach/sysasic.h> 17 + #include <mach/dma.h> 18 18 #include <asm/dma.h> 19 19 #include <asm/io.h> 20 20
+1 -1
arch/sh/drivers/dma/dma-sh.c
··· 14 14 #include <linux/init.h> 15 15 #include <linux/interrupt.h> 16 16 #include <linux/module.h> 17 - #include <asm/dreamcast/dma.h> 17 + #include <mach/dma.h> 18 18 #include <asm/dma.h> 19 19 #include <asm/io.h> 20 20 #include "dma-sh.h"
+1 -1
arch/sh/drivers/dma/dma-sh.h
··· 11 11 #ifndef __DMA_SH_H 12 12 #define __DMA_SH_H 13 13 14 - #include <asm/cpu/dma.h> 14 + #include <cpu/dma.h> 15 15 16 16 /* Definitions for the SuperH DMAC */ 17 17 #define REQ_L 0x00000000
+1 -1
arch/sh/drivers/pci/fixups-dreamcast.c
··· 26 26 27 27 #include <asm/io.h> 28 28 #include <asm/irq.h> 29 - #include <asm/mach/pci.h> 29 + #include <mach/pci.h> 30 30 31 31 static void __init gapspci_fixup_resources(struct pci_dev *dev) 32 32 {
+1 -1
arch/sh/drivers/pci/ops-cayman.c
··· 2 2 #include <linux/init.h> 3 3 #include <linux/pci.h> 4 4 #include <linux/types.h> 5 - #include <asm/cpu/irq.h> 5 + #include <cpu/irq.h> 6 6 #include "pci-sh5.h" 7 7 8 8 static inline u8 bridge_swizzle(u8 pin, u8 slot)
+1 -1
arch/sh/drivers/pci/ops-dreamcast.c
··· 26 26 27 27 #include <asm/io.h> 28 28 #include <asm/irq.h> 29 - #include <asm/mach/pci.h> 29 + #include <mach/pci.h> 30 30 31 31 static struct resource gapspci_io_resource = { 32 32 .name = "GAPSPCI IO",
+1 -1
arch/sh/drivers/pci/pci-sh5.c
··· 19 19 #include <linux/delay.h> 20 20 #include <linux/types.h> 21 21 #include <linux/irq.h> 22 - #include <asm/cpu/irq.h> 22 + #include <cpu/irq.h> 23 23 #include <asm/pci.h> 24 24 #include <asm/io.h> 25 25 #include "pci-sh5.h"
+1
arch/sh/include/asm/.gitignore
··· 1 + machtypes.h
+13
arch/sh/include/asm/adc.h
··· 1 + #ifndef __ASM_ADC_H 2 + #define __ASM_ADC_H 3 + #ifdef __KERNEL__ 4 + /* 5 + * Copyright (C) 2004 Andriy Skulysh 6 + */ 7 + 8 + #include <cpu/adc.h> 9 + 10 + int adc_single(unsigned int channel); 11 + 12 + #endif /* __KERNEL__ */ 13 + #endif /* __ASM_ADC_H */
+53
arch/sh/include/asm/addrspace.h
··· 1 + /* 2 + * This file is subject to the terms and conditions of the GNU General Public 3 + * License. See the file "COPYING" in the main directory of this archive 4 + * for more details. 5 + * 6 + * Copyright (C) 1999 by Kaz Kojima 7 + * 8 + * Defitions for the address spaces of the SH CPUs. 9 + */ 10 + #ifndef __ASM_SH_ADDRSPACE_H 11 + #define __ASM_SH_ADDRSPACE_H 12 + 13 + #ifdef __KERNEL__ 14 + 15 + #include <cpu/addrspace.h> 16 + 17 + /* If this CPU supports segmentation, hook up the helpers */ 18 + #ifdef P1SEG 19 + 20 + /* 21 + [ P0/U0 (virtual) ] 0x00000000 <------ User space 22 + [ P1 (fixed) cached ] 0x80000000 <------ Kernel space 23 + [ P2 (fixed) non-cachable] 0xA0000000 <------ Physical access 24 + [ P3 (virtual) cached] 0xC0000000 <------ vmalloced area 25 + [ P4 control ] 0xE0000000 26 + */ 27 + 28 + /* Returns the privileged segment base of a given address */ 29 + #define PXSEG(a) (((unsigned long)(a)) & 0xe0000000) 30 + 31 + /* Returns the physical address of a PnSEG (n=1,2) address */ 32 + #define PHYSADDR(a) (((unsigned long)(a)) & 0x1fffffff) 33 + 34 + #ifdef CONFIG_29BIT 35 + /* 36 + * Map an address to a certain privileged segment 37 + */ 38 + #define P1SEGADDR(a) \ 39 + ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P1SEG)) 40 + #define P2SEGADDR(a) \ 41 + ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P2SEG)) 42 + #define P3SEGADDR(a) \ 43 + ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P3SEG)) 44 + #define P4SEGADDR(a) \ 45 + ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P4SEG)) 46 + #endif /* 29BIT */ 47 + #endif /* P1SEG */ 48 + 49 + /* Check if an address can be reached in 29 bits */ 50 + #define IS_29BIT(a) (((unsigned long)(a)) < 0x20000000) 51 + 52 + #endif /* __KERNEL__ */ 53 + #endif /* __ASM_SH_ADDRSPACE_H */
+51
arch/sh/include/asm/cache.h
··· 1 + /* $Id: cache.h,v 1.6 2004/03/11 18:08:05 lethal Exp $ 2 + * 3 + * include/asm-sh/cache.h 4 + * 5 + * Copyright 1999 (C) Niibe Yutaka 6 + * Copyright 2002, 2003 (C) Paul Mundt 7 + */ 8 + #ifndef __ASM_SH_CACHE_H 9 + #define __ASM_SH_CACHE_H 10 + #ifdef __KERNEL__ 11 + 12 + #include <linux/init.h> 13 + #include <cpu/cache.h> 14 + 15 + #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) 16 + 17 + #define __read_mostly __attribute__((__section__(".data.read_mostly"))) 18 + 19 + #ifndef __ASSEMBLY__ 20 + struct cache_info { 21 + unsigned int ways; /* Number of cache ways */ 22 + unsigned int sets; /* Number of cache sets */ 23 + unsigned int linesz; /* Cache line size (bytes) */ 24 + 25 + unsigned int way_size; /* sets * line size */ 26 + 27 + /* 28 + * way_incr is the address offset for accessing the next way 29 + * in memory mapped cache array ops. 30 + */ 31 + unsigned int way_incr; 32 + unsigned int entry_shift; 33 + unsigned int entry_mask; 34 + 35 + /* 36 + * Compute a mask which selects the address bits which overlap between 37 + * 1. those used to select the cache set during indexing 38 + * 2. those in the physical page number. 39 + */ 40 + unsigned int alias_mask; 41 + 42 + unsigned int n_aliases; /* Number of aliases */ 43 + 44 + unsigned long flags; 45 + }; 46 + 47 + int __init detect_cpu_and_cache_system(void); 48 + 49 + #endif /* __ASSEMBLY__ */ 50 + #endif /* __KERNEL__ */ 51 + #endif /* __ASM_SH_CACHE_H */
+81
arch/sh/include/asm/cacheflush.h
··· 1 + #ifndef __ASM_SH_CACHEFLUSH_H 2 + #define __ASM_SH_CACHEFLUSH_H 3 + 4 + #ifdef __KERNEL__ 5 + 6 + #ifdef CONFIG_CACHE_OFF 7 + /* 8 + * Nothing to do when the cache is disabled, initial flush and explicit 9 + * disabling is handled at CPU init time. 10 + * 11 + * See arch/sh/kernel/cpu/init.c:cache_init(). 12 + */ 13 + #define p3_cache_init() do { } while (0) 14 + #define flush_cache_all() do { } while (0) 15 + #define flush_cache_mm(mm) do { } while (0) 16 + #define flush_cache_dup_mm(mm) do { } while (0) 17 + #define flush_cache_range(vma, start, end) do { } while (0) 18 + #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) 19 + #define flush_dcache_page(page) do { } while (0) 20 + #define flush_icache_range(start, end) do { } while (0) 21 + #define flush_icache_page(vma,pg) do { } while (0) 22 + #define flush_dcache_mmap_lock(mapping) do { } while (0) 23 + #define flush_dcache_mmap_unlock(mapping) do { } while (0) 24 + #define flush_cache_sigtramp(vaddr) do { } while (0) 25 + #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) 26 + #define __flush_wback_region(start, size) do { (void)(start); } while (0) 27 + #define __flush_purge_region(start, size) do { (void)(start); } while (0) 28 + #define __flush_invalidate_region(start, size) do { (void)(start); } while (0) 29 + #else 30 + #include <cpu/cacheflush.h> 31 + 32 + /* 33 + * Consistent DMA requires that the __flush_xxx() primitives must be set 34 + * for any of the enabled non-coherent caches (most of the UP CPUs), 35 + * regardless of PIPT or VIPT cache configurations. 36 + */ 37 + 38 + /* Flush (write-back only) a region (smaller than a page) */ 39 + extern void __flush_wback_region(void *start, int size); 40 + /* Flush (write-back & invalidate) a region (smaller than a page) */ 41 + extern void __flush_purge_region(void *start, int size); 42 + /* Flush (invalidate only) a region (smaller than a page) */ 43 + extern void __flush_invalidate_region(void *start, int size); 44 + #endif 45 + 46 + #define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE 47 + static inline void flush_kernel_dcache_page(struct page *page) 48 + { 49 + flush_dcache_page(page); 50 + } 51 + 52 + #if defined(CONFIG_CPU_SH4) && !defined(CONFIG_CACHE_OFF) 53 + extern void copy_to_user_page(struct vm_area_struct *vma, 54 + struct page *page, unsigned long vaddr, void *dst, const void *src, 55 + unsigned long len); 56 + 57 + extern void copy_from_user_page(struct vm_area_struct *vma, 58 + struct page *page, unsigned long vaddr, void *dst, const void *src, 59 + unsigned long len); 60 + #else 61 + #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ 62 + do { \ 63 + flush_cache_page(vma, vaddr, page_to_pfn(page));\ 64 + memcpy(dst, src, len); \ 65 + flush_icache_user_range(vma, page, vaddr, len); \ 66 + } while (0) 67 + 68 + #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ 69 + do { \ 70 + flush_cache_page(vma, vaddr, page_to_pfn(page));\ 71 + memcpy(dst, src, len); \ 72 + } while (0) 73 + #endif 74 + 75 + #define flush_cache_vmap(start, end) flush_cache_all() 76 + #define flush_cache_vunmap(start, end) flush_cache_all() 77 + 78 + #define HAVE_ARCH_UNMAPPED_AREA 79 + 80 + #endif /* __KERNEL__ */ 81 + #endif /* __ASM_SH_CACHEFLUSH_H */
+166
arch/sh/include/asm/dma.h
··· 1 + /* 2 + * include/asm-sh/dma.h 3 + * 4 + * Copyright (C) 2003, 2004 Paul Mundt 5 + * 6 + * This file is subject to the terms and conditions of the GNU General Public 7 + * License. See the file "COPYING" in the main directory of this archive 8 + * for more details. 9 + */ 10 + #ifndef __ASM_SH_DMA_H 11 + #define __ASM_SH_DMA_H 12 + #ifdef __KERNEL__ 13 + 14 + #include <linux/spinlock.h> 15 + #include <linux/wait.h> 16 + #include <linux/sched.h> 17 + #include <linux/sysdev.h> 18 + #include <cpu/dma.h> 19 + 20 + /* The maximum address that we can perform a DMA transfer to on this platform */ 21 + /* Don't define MAX_DMA_ADDRESS; it's useless on the SuperH and any 22 + occurrence should be flagged as an error. */ 23 + /* But... */ 24 + /* XXX: This is not applicable to SuperH, just needed for alloc_bootmem */ 25 + #define MAX_DMA_ADDRESS (PAGE_OFFSET+0x10000000) 26 + 27 + #ifdef CONFIG_NR_DMA_CHANNELS 28 + # define MAX_DMA_CHANNELS (CONFIG_NR_DMA_CHANNELS) 29 + #else 30 + # define MAX_DMA_CHANNELS (CONFIG_NR_ONCHIP_DMA_CHANNELS) 31 + #endif 32 + 33 + /* 34 + * Read and write modes can mean drastically different things depending on the 35 + * channel configuration. Consult your DMAC documentation and module 36 + * implementation for further clues. 37 + */ 38 + #define DMA_MODE_READ 0x00 39 + #define DMA_MODE_WRITE 0x01 40 + #define DMA_MODE_MASK 0x01 41 + 42 + #define DMA_AUTOINIT 0x10 43 + 44 + /* 45 + * DMAC (dma_info) flags 46 + */ 47 + enum { 48 + DMAC_CHANNELS_CONFIGURED = 0x01, 49 + DMAC_CHANNELS_TEI_CAPABLE = 0x02, /* Transfer end interrupt */ 50 + }; 51 + 52 + /* 53 + * DMA channel capabilities / flags 54 + */ 55 + enum { 56 + DMA_CONFIGURED = 0x01, 57 + 58 + /* 59 + * Transfer end interrupt, inherited from DMAC. 60 + * wait_queue used in dma_wait_for_completion. 61 + */ 62 + DMA_TEI_CAPABLE = 0x02, 63 + }; 64 + 65 + extern spinlock_t dma_spin_lock; 66 + 67 + struct dma_channel; 68 + 69 + struct dma_ops { 70 + int (*request)(struct dma_channel *chan); 71 + void (*free)(struct dma_channel *chan); 72 + 73 + int (*get_residue)(struct dma_channel *chan); 74 + int (*xfer)(struct dma_channel *chan); 75 + int (*configure)(struct dma_channel *chan, unsigned long flags); 76 + int (*extend)(struct dma_channel *chan, unsigned long op, void *param); 77 + }; 78 + 79 + struct dma_channel { 80 + char dev_id[16]; /* unique name per DMAC of channel */ 81 + 82 + unsigned int chan; /* DMAC channel number */ 83 + unsigned int vchan; /* Virtual channel number */ 84 + 85 + unsigned int mode; 86 + unsigned int count; 87 + 88 + unsigned long sar; 89 + unsigned long dar; 90 + 91 + const char **caps; 92 + 93 + unsigned long flags; 94 + atomic_t busy; 95 + 96 + wait_queue_head_t wait_queue; 97 + 98 + struct sys_device dev; 99 + void *priv_data; 100 + }; 101 + 102 + struct dma_info { 103 + struct platform_device *pdev; 104 + 105 + const char *name; 106 + unsigned int nr_channels; 107 + unsigned long flags; 108 + 109 + struct dma_ops *ops; 110 + struct dma_channel *channels; 111 + 112 + struct list_head list; 113 + int first_channel_nr; 114 + int first_vchannel_nr; 115 + }; 116 + 117 + struct dma_chan_caps { 118 + int ch_num; 119 + const char **caplist; 120 + }; 121 + 122 + #define to_dma_channel(channel) container_of(channel, struct dma_channel, dev) 123 + 124 + /* arch/sh/drivers/dma/dma-api.c */ 125 + extern int dma_xfer(unsigned int chan, unsigned long from, 126 + unsigned long to, size_t size, unsigned int mode); 127 + 128 + #define dma_write(chan, from, to, size) \ 129 + dma_xfer(chan, from, to, size, DMA_MODE_WRITE) 130 + #define dma_write_page(chan, from, to) \ 131 + dma_write(chan, from, to, PAGE_SIZE) 132 + 133 + #define dma_read(chan, from, to, size) \ 134 + dma_xfer(chan, from, to, size, DMA_MODE_READ) 135 + #define dma_read_page(chan, from, to) \ 136 + dma_read(chan, from, to, PAGE_SIZE) 137 + 138 + extern int request_dma_bycap(const char **dmac, const char **caps, 139 + const char *dev_id); 140 + extern int request_dma(unsigned int chan, const char *dev_id); 141 + extern void free_dma(unsigned int chan); 142 + extern int get_dma_residue(unsigned int chan); 143 + extern struct dma_info *get_dma_info(unsigned int chan); 144 + extern struct dma_channel *get_dma_channel(unsigned int chan); 145 + extern void dma_wait_for_completion(unsigned int chan); 146 + extern void dma_configure_channel(unsigned int chan, unsigned long flags); 147 + 148 + extern int register_dmac(struct dma_info *info); 149 + extern void unregister_dmac(struct dma_info *info); 150 + extern struct dma_info *get_dma_info_by_name(const char *dmac_name); 151 + 152 + extern int dma_extend(unsigned int chan, unsigned long op, void *param); 153 + extern int register_chan_caps(const char *dmac, struct dma_chan_caps *capslist); 154 + 155 + /* arch/sh/drivers/dma/dma-sysfs.c */ 156 + extern int dma_create_sysfs_files(struct dma_channel *, struct dma_info *); 157 + extern void dma_remove_sysfs_files(struct dma_channel *, struct dma_info *); 158 + 159 + #ifdef CONFIG_PCI 160 + extern int isa_dma_bridge_buggy; 161 + #else 162 + #define isa_dma_bridge_buggy (0) 163 + #endif 164 + 165 + #endif /* __KERNEL__ */ 166 + #endif /* __ASM_SH_DMA_H */
+18
arch/sh/include/asm/freq.h
··· 1 + /* 2 + * include/asm-sh/freq.h 3 + * 4 + * Copyright (C) 2002, 2003 Paul Mundt 5 + * 6 + * This program is free software; you can redistribute it and/or modify it 7 + * under the terms of the GNU General Public License as published by the 8 + * Free Software Foundation; either version 2 of the License, or (at your 9 + * option) any later version. 10 + */ 11 + #ifndef __ASM_SH_FREQ_H 12 + #define __ASM_SH_FREQ_H 13 + #ifdef __KERNEL__ 14 + 15 + #include <cpu/freq.h> 16 + 17 + #endif /* __KERNEL__ */ 18 + #endif /* __ASM_SH_FREQ_H */
+19
arch/sh/include/asm/gpio.h
··· 1 + /* 2 + * include/asm-sh/gpio.h 3 + * 4 + * Copyright (C) 2007 Markus Brunner, Mark Jonas 5 + * 6 + * Addresses for the Pin Function Controller 7 + * 8 + * This file is subject to the terms and conditions of the GNU General Public 9 + * License. See the file "COPYING" in the main directory of this archive 10 + * for more details. 11 + */ 12 + #ifndef __ASM_SH_GPIO_H 13 + #define __ASM_SH_GPIO_H 14 + 15 + #if defined(CONFIG_CPU_SH3) 16 + #include <cpu/gpio.h> 17 + #endif 18 + 19 + #endif /* __ASM_SH_GPIO_H */
+57
arch/sh/include/asm/irq.h
··· 1 + #ifndef __ASM_SH_IRQ_H 2 + #define __ASM_SH_IRQ_H 3 + 4 + #include <asm/machvec.h> 5 + 6 + /* 7 + * A sane default based on a reasonable vector table size, platforms are 8 + * advised to cap this at the hard limit that they're interested in 9 + * through the machvec. 10 + */ 11 + #define NR_IRQS 256 12 + 13 + /* 14 + * Convert back and forth between INTEVT and IRQ values. 15 + */ 16 + #ifdef CONFIG_CPU_HAS_INTEVT 17 + #define evt2irq(evt) (((evt) >> 5) - 16) 18 + #define irq2evt(irq) (((irq) + 16) << 5) 19 + #else 20 + #define evt2irq(evt) (evt) 21 + #define irq2evt(irq) (irq) 22 + #endif 23 + 24 + /* 25 + * Simple Mask Register Support 26 + */ 27 + extern void make_maskreg_irq(unsigned int irq); 28 + extern unsigned short *irq_mask_register; 29 + 30 + /* 31 + * PINT IRQs 32 + */ 33 + void init_IRQ_pint(void); 34 + void make_imask_irq(unsigned int irq); 35 + 36 + static inline int generic_irq_demux(int irq) 37 + { 38 + return irq; 39 + } 40 + 41 + #define irq_canonicalize(irq) (irq) 42 + #define irq_demux(irq) sh_mv.mv_irq_demux(irq) 43 + 44 + #ifdef CONFIG_IRQSTACKS 45 + extern void irq_ctx_init(int cpu); 46 + extern void irq_ctx_exit(int cpu); 47 + # define __ARCH_HAS_DO_SOFTIRQ 48 + #else 49 + # define irq_ctx_init(cpu) do { } while (0) 50 + # define irq_ctx_exit(cpu) do { } while (0) 51 + #endif 52 + 53 + #ifdef CONFIG_CPU_SH5 54 + #include <cpu/irq.h> 55 + #endif 56 + 57 + #endif /* __ASM_SH_IRQ_H */
+85
arch/sh/include/asm/irqflags_64.h
··· 1 + #ifndef __ASM_SH_IRQFLAGS_64_H 2 + #define __ASM_SH_IRQFLAGS_64_H 3 + 4 + #include <cpu/registers.h> 5 + 6 + #define SR_MASK_LL 0x00000000000000f0LL 7 + #define SR_BL_LL 0x0000000010000000LL 8 + 9 + static inline void raw_local_irq_enable(void) 10 + { 11 + unsigned long long __dummy0, __dummy1 = ~SR_MASK_LL; 12 + 13 + __asm__ __volatile__("getcon " __SR ", %0\n\t" 14 + "and %0, %1, %0\n\t" 15 + "putcon %0, " __SR "\n\t" 16 + : "=&r" (__dummy0) 17 + : "r" (__dummy1)); 18 + } 19 + 20 + static inline void raw_local_irq_disable(void) 21 + { 22 + unsigned long long __dummy0, __dummy1 = SR_MASK_LL; 23 + 24 + __asm__ __volatile__("getcon " __SR ", %0\n\t" 25 + "or %0, %1, %0\n\t" 26 + "putcon %0, " __SR "\n\t" 27 + : "=&r" (__dummy0) 28 + : "r" (__dummy1)); 29 + } 30 + 31 + static inline void set_bl_bit(void) 32 + { 33 + unsigned long long __dummy0, __dummy1 = SR_BL_LL; 34 + 35 + __asm__ __volatile__("getcon " __SR ", %0\n\t" 36 + "or %0, %1, %0\n\t" 37 + "putcon %0, " __SR "\n\t" 38 + : "=&r" (__dummy0) 39 + : "r" (__dummy1)); 40 + 41 + } 42 + 43 + static inline void clear_bl_bit(void) 44 + { 45 + unsigned long long __dummy0, __dummy1 = ~SR_BL_LL; 46 + 47 + __asm__ __volatile__("getcon " __SR ", %0\n\t" 48 + "and %0, %1, %0\n\t" 49 + "putcon %0, " __SR "\n\t" 50 + : "=&r" (__dummy0) 51 + : "r" (__dummy1)); 52 + } 53 + 54 + static inline unsigned long __raw_local_save_flags(void) 55 + { 56 + unsigned long long __dummy = SR_MASK_LL; 57 + unsigned long flags; 58 + 59 + __asm__ __volatile__ ( 60 + "getcon " __SR ", %0\n\t" 61 + "and %0, %1, %0" 62 + : "=&r" (flags) 63 + : "r" (__dummy)); 64 + 65 + return flags; 66 + } 67 + 68 + static inline unsigned long __raw_local_irq_save(void) 69 + { 70 + unsigned long long __dummy0, __dummy1 = SR_MASK_LL; 71 + unsigned long flags; 72 + 73 + __asm__ __volatile__ ( 74 + "getcon " __SR ", %1\n\t" 75 + "or %1, r63, %0\n\t" 76 + "or %1, %2, %1\n\t" 77 + "putcon %1, " __SR "\n\t" 78 + "and %0, %2, %0" 79 + : "=&r" (flags), "=&r" (__dummy0) 80 + : "r" (__dummy1)); 81 + 82 + return flags; 83 + } 84 + 85 + #endif /* __ASM_SH_IRQFLAGS_64_H */
+185
arch/sh/include/asm/mmu_context.h
··· 1 + /* 2 + * Copyright (C) 1999 Niibe Yutaka 3 + * Copyright (C) 2003 - 2007 Paul Mundt 4 + * 5 + * ASID handling idea taken from MIPS implementation. 6 + */ 7 + #ifndef __ASM_SH_MMU_CONTEXT_H 8 + #define __ASM_SH_MMU_CONTEXT_H 9 + 10 + #ifdef __KERNEL__ 11 + #include <cpu/mmu_context.h> 12 + #include <asm/tlbflush.h> 13 + #include <asm/uaccess.h> 14 + #include <asm/io.h> 15 + #include <asm-generic/mm_hooks.h> 16 + 17 + /* 18 + * The MMU "context" consists of two things: 19 + * (a) TLB cache version (or round, cycle whatever expression you like) 20 + * (b) ASID (Address Space IDentifier) 21 + */ 22 + #define MMU_CONTEXT_ASID_MASK 0x000000ff 23 + #define MMU_CONTEXT_VERSION_MASK 0xffffff00 24 + #define MMU_CONTEXT_FIRST_VERSION 0x00000100 25 + #define NO_CONTEXT 0 26 + 27 + /* ASID is 8-bit value, so it can't be 0x100 */ 28 + #define MMU_NO_ASID 0x100 29 + 30 + #define asid_cache(cpu) (cpu_data[cpu].asid_cache) 31 + 32 + #ifdef CONFIG_MMU 33 + #define cpu_context(cpu, mm) ((mm)->context.id[cpu]) 34 + 35 + #define cpu_asid(cpu, mm) \ 36 + (cpu_context((cpu), (mm)) & MMU_CONTEXT_ASID_MASK) 37 + 38 + /* 39 + * Virtual Page Number mask 40 + */ 41 + #define MMU_VPN_MASK 0xfffff000 42 + 43 + #if defined(CONFIG_SUPERH32) 44 + #include "mmu_context_32.h" 45 + #else 46 + #include "mmu_context_64.h" 47 + #endif 48 + 49 + /* 50 + * Get MMU context if needed. 51 + */ 52 + static inline void get_mmu_context(struct mm_struct *mm, unsigned int cpu) 53 + { 54 + unsigned long asid = asid_cache(cpu); 55 + 56 + /* Check if we have old version of context. */ 57 + if (((cpu_context(cpu, mm) ^ asid) & MMU_CONTEXT_VERSION_MASK) == 0) 58 + /* It's up to date, do nothing */ 59 + return; 60 + 61 + /* It's old, we need to get new context with new version. */ 62 + if (!(++asid & MMU_CONTEXT_ASID_MASK)) { 63 + /* 64 + * We exhaust ASID of this version. 65 + * Flush all TLB and start new cycle. 66 + */ 67 + flush_tlb_all(); 68 + 69 + #ifdef CONFIG_SUPERH64 70 + /* 71 + * The SH-5 cache uses the ASIDs, requiring both the I and D 72 + * cache to be flushed when the ASID is exhausted. Weak. 73 + */ 74 + flush_cache_all(); 75 + #endif 76 + 77 + /* 78 + * Fix version; Note that we avoid version #0 79 + * to distingush NO_CONTEXT. 80 + */ 81 + if (!asid) 82 + asid = MMU_CONTEXT_FIRST_VERSION; 83 + } 84 + 85 + cpu_context(cpu, mm) = asid_cache(cpu) = asid; 86 + } 87 + 88 + /* 89 + * Initialize the context related info for a new mm_struct 90 + * instance. 91 + */ 92 + static inline int init_new_context(struct task_struct *tsk, 93 + struct mm_struct *mm) 94 + { 95 + int i; 96 + 97 + for (i = 0; i < num_online_cpus(); i++) 98 + cpu_context(i, mm) = NO_CONTEXT; 99 + 100 + return 0; 101 + } 102 + 103 + /* 104 + * After we have set current->mm to a new value, this activates 105 + * the context for the new mm so we see the new mappings. 106 + */ 107 + static inline void activate_context(struct mm_struct *mm, unsigned int cpu) 108 + { 109 + get_mmu_context(mm, cpu); 110 + set_asid(cpu_asid(cpu, mm)); 111 + } 112 + 113 + static inline void switch_mm(struct mm_struct *prev, 114 + struct mm_struct *next, 115 + struct task_struct *tsk) 116 + { 117 + unsigned int cpu = smp_processor_id(); 118 + 119 + if (likely(prev != next)) { 120 + cpu_set(cpu, next->cpu_vm_mask); 121 + set_TTB(next->pgd); 122 + activate_context(next, cpu); 123 + } else 124 + if (!cpu_test_and_set(cpu, next->cpu_vm_mask)) 125 + activate_context(next, cpu); 126 + } 127 + #else 128 + #define get_mmu_context(mm) do { } while (0) 129 + #define init_new_context(tsk,mm) (0) 130 + #define destroy_context(mm) do { } while (0) 131 + #define set_asid(asid) do { } while (0) 132 + #define get_asid() (0) 133 + #define cpu_asid(cpu, mm) ({ (void)cpu; 0; }) 134 + #define switch_and_save_asid(asid) (0) 135 + #define set_TTB(pgd) do { } while (0) 136 + #define get_TTB() (0) 137 + #define activate_context(mm,cpu) do { } while (0) 138 + #define switch_mm(prev,next,tsk) do { } while (0) 139 + #endif /* CONFIG_MMU */ 140 + 141 + #define activate_mm(prev, next) switch_mm((prev),(next),NULL) 142 + #define deactivate_mm(tsk,mm) do { } while (0) 143 + #define enter_lazy_tlb(mm,tsk) do { } while (0) 144 + 145 + #if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4) 146 + /* 147 + * If this processor has an MMU, we need methods to turn it off/on .. 148 + * paging_init() will also have to be updated for the processor in 149 + * question. 150 + */ 151 + static inline void enable_mmu(void) 152 + { 153 + unsigned int cpu = smp_processor_id(); 154 + 155 + /* Enable MMU */ 156 + ctrl_outl(MMU_CONTROL_INIT, MMUCR); 157 + ctrl_barrier(); 158 + 159 + if (asid_cache(cpu) == NO_CONTEXT) 160 + asid_cache(cpu) = MMU_CONTEXT_FIRST_VERSION; 161 + 162 + set_asid(asid_cache(cpu) & MMU_CONTEXT_ASID_MASK); 163 + } 164 + 165 + static inline void disable_mmu(void) 166 + { 167 + unsigned long cr; 168 + 169 + cr = ctrl_inl(MMUCR); 170 + cr &= ~MMU_CONTROL_INIT; 171 + ctrl_outl(cr, MMUCR); 172 + 173 + ctrl_barrier(); 174 + } 175 + #else 176 + /* 177 + * MMU control handlers for processors lacking memory 178 + * management hardware. 179 + */ 180 + #define enable_mmu() do { } while (0) 181 + #define disable_mmu() do { } while (0) 182 + #endif 183 + 184 + #endif /* __KERNEL__ */ 185 + #endif /* __ASM_SH_MMU_CONTEXT_H */
+78
arch/sh/include/asm/mmu_context_64.h
··· 1 + #ifndef __ASM_SH_MMU_CONTEXT_64_H 2 + #define __ASM_SH_MMU_CONTEXT_64_H 3 + 4 + /* 5 + * sh64-specific mmu_context interface. 6 + * 7 + * Copyright (C) 2000, 2001 Paolo Alberelli 8 + * Copyright (C) 2003 - 2007 Paul Mundt 9 + * 10 + * This file is subject to the terms and conditions of the GNU General Public 11 + * License. See the file "COPYING" in the main directory of this archive 12 + * for more details. 13 + */ 14 + #include <cpu/registers.h> 15 + #include <asm/cacheflush.h> 16 + 17 + #define SR_ASID_MASK 0xffffffffff00ffffULL 18 + #define SR_ASID_SHIFT 16 19 + 20 + /* 21 + * Destroy context related info for an mm_struct that is about 22 + * to be put to rest. 23 + */ 24 + static inline void destroy_context(struct mm_struct *mm) 25 + { 26 + /* Well, at least free TLB entries */ 27 + flush_tlb_mm(mm); 28 + } 29 + 30 + static inline unsigned long get_asid(void) 31 + { 32 + unsigned long long sr; 33 + 34 + asm volatile ("getcon " __SR ", %0\n\t" 35 + : "=r" (sr)); 36 + 37 + sr = (sr >> SR_ASID_SHIFT) & MMU_CONTEXT_ASID_MASK; 38 + return (unsigned long) sr; 39 + } 40 + 41 + /* Set ASID into SR */ 42 + static inline void set_asid(unsigned long asid) 43 + { 44 + unsigned long long sr, pc; 45 + 46 + asm volatile ("getcon " __SR ", %0" : "=r" (sr)); 47 + 48 + sr = (sr & SR_ASID_MASK) | (asid << SR_ASID_SHIFT); 49 + 50 + /* 51 + * It is possible that this function may be inlined and so to avoid 52 + * the assembler reporting duplicate symbols we make use of the 53 + * gas trick of generating symbols using numerics and forward 54 + * reference. 55 + */ 56 + asm volatile ("movi 1, %1\n\t" 57 + "shlli %1, 28, %1\n\t" 58 + "or %0, %1, %1\n\t" 59 + "putcon %1, " __SR "\n\t" 60 + "putcon %0, " __SSR "\n\t" 61 + "movi 1f, %1\n\t" 62 + "ori %1, 1 , %1\n\t" 63 + "putcon %1, " __SPC "\n\t" 64 + "rte\n" 65 + "1:\n\t" 66 + : "=r" (sr), "=r" (pc) : "0" (sr)); 67 + } 68 + 69 + /* arch/sh/kernel/cpu/sh5/entry.S */ 70 + extern unsigned long switch_and_save_asid(unsigned long new_asid); 71 + 72 + /* No spare register to twiddle, so use a software cache */ 73 + extern pgd_t *mmu_pdtp_cache; 74 + 75 + #define set_TTB(pgd) (mmu_pdtp_cache = (pgd)) 76 + #define get_TTB() (mmu_pdtp_cache) 77 + 78 + #endif /* __ASM_SH_MMU_CONTEXT_64_H */
+275
arch/sh/include/asm/processor_64.h
··· 1 + #ifndef __ASM_SH_PROCESSOR_64_H 2 + #define __ASM_SH_PROCESSOR_64_H 3 + 4 + /* 5 + * include/asm-sh/processor_64.h 6 + * 7 + * Copyright (C) 2000, 2001 Paolo Alberelli 8 + * Copyright (C) 2003 Paul Mundt 9 + * Copyright (C) 2004 Richard Curnow 10 + * 11 + * This file is subject to the terms and conditions of the GNU General Public 12 + * License. See the file "COPYING" in the main directory of this archive 13 + * for more details. 14 + */ 15 + #ifndef __ASSEMBLY__ 16 + 17 + #include <linux/compiler.h> 18 + #include <asm/page.h> 19 + #include <asm/types.h> 20 + #include <asm/cache.h> 21 + #include <asm/ptrace.h> 22 + #include <cpu/registers.h> 23 + 24 + /* 25 + * Default implementation of macro that returns current 26 + * instruction pointer ("program counter"). 27 + */ 28 + #define current_text_addr() ({ \ 29 + void *pc; \ 30 + unsigned long long __dummy = 0; \ 31 + __asm__("gettr tr0, %1\n\t" \ 32 + "pta 4, tr0\n\t" \ 33 + "gettr tr0, %0\n\t" \ 34 + "ptabs %1, tr0\n\t" \ 35 + :"=r" (pc), "=r" (__dummy) \ 36 + : "1" (__dummy)); \ 37 + pc; }) 38 + 39 + /* 40 + * TLB information structure 41 + * 42 + * Defined for both I and D tlb, per-processor. 43 + */ 44 + struct tlb_info { 45 + unsigned long long next; 46 + unsigned long long first; 47 + unsigned long long last; 48 + 49 + unsigned int entries; 50 + unsigned int step; 51 + 52 + unsigned long flags; 53 + }; 54 + 55 + struct sh_cpuinfo { 56 + enum cpu_type type; 57 + unsigned long loops_per_jiffy; 58 + unsigned long asid_cache; 59 + 60 + unsigned int cpu_clock, master_clock, bus_clock, module_clock; 61 + 62 + /* Cache info */ 63 + struct cache_info icache; 64 + struct cache_info dcache; 65 + struct cache_info scache; 66 + 67 + /* TLB info */ 68 + struct tlb_info itlb; 69 + struct tlb_info dtlb; 70 + 71 + unsigned long flags; 72 + }; 73 + 74 + extern struct sh_cpuinfo cpu_data[]; 75 + #define boot_cpu_data cpu_data[0] 76 + #define current_cpu_data cpu_data[smp_processor_id()] 77 + #define raw_current_cpu_data cpu_data[raw_smp_processor_id()] 78 + 79 + #endif 80 + 81 + /* 82 + * User space process size: 2GB - 4k. 83 + */ 84 + #define TASK_SIZE 0x7ffff000UL 85 + 86 + #define STACK_TOP TASK_SIZE 87 + #define STACK_TOP_MAX STACK_TOP 88 + 89 + /* This decides where the kernel will search for a free chunk of vm 90 + * space during mmap's. 91 + */ 92 + #define TASK_UNMAPPED_BASE (TASK_SIZE / 3) 93 + 94 + /* 95 + * Bit of SR register 96 + * 97 + * FD-bit: 98 + * When it's set, it means the processor doesn't have right to use FPU, 99 + * and it results exception when the floating operation is executed. 100 + * 101 + * IMASK-bit: 102 + * Interrupt level mask 103 + * 104 + * STEP-bit: 105 + * Single step bit 106 + * 107 + */ 108 + #if defined(CONFIG_SH64_SR_WATCH) 109 + #define SR_MMU 0x84000000 110 + #else 111 + #define SR_MMU 0x80000000 112 + #endif 113 + 114 + #define SR_IMASK 0x000000f0 115 + #define SR_FD 0x00008000 116 + #define SR_SSTEP 0x08000000 117 + 118 + #ifndef __ASSEMBLY__ 119 + 120 + /* 121 + * FPU structure and data : require 8-byte alignment as we need to access it 122 + with fld.p, fst.p 123 + */ 124 + 125 + struct sh_fpu_hard_struct { 126 + unsigned long fp_regs[64]; 127 + unsigned int fpscr; 128 + /* long status; * software status information */ 129 + }; 130 + 131 + #if 0 132 + /* Dummy fpu emulator */ 133 + struct sh_fpu_soft_struct { 134 + unsigned long long fp_regs[32]; 135 + unsigned int fpscr; 136 + unsigned char lookahead; 137 + unsigned long entry_pc; 138 + }; 139 + #endif 140 + 141 + union sh_fpu_union { 142 + struct sh_fpu_hard_struct hard; 143 + /* 'hard' itself only produces 32 bit alignment, yet we need 144 + to access it using 64 bit load/store as well. */ 145 + unsigned long long alignment_dummy; 146 + }; 147 + 148 + struct thread_struct { 149 + unsigned long sp; 150 + unsigned long pc; 151 + /* This stores the address of the pt_regs built during a context 152 + switch, or of the register save area built for a kernel mode 153 + exception. It is used for backtracing the stack of a sleeping task 154 + or one that traps in kernel mode. */ 155 + struct pt_regs *kregs; 156 + /* This stores the address of the pt_regs constructed on entry from 157 + user mode. It is a fixed value over the lifetime of a process, or 158 + NULL for a kernel thread. */ 159 + struct pt_regs *uregs; 160 + 161 + unsigned long trap_no, error_code; 162 + unsigned long address; 163 + /* Hardware debugging registers may come here */ 164 + 165 + /* floating point info */ 166 + union sh_fpu_union fpu; 167 + }; 168 + 169 + #define INIT_MMAP \ 170 + { &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL } 171 + 172 + extern struct pt_regs fake_swapper_regs; 173 + 174 + #define INIT_THREAD { \ 175 + .sp = sizeof(init_stack) + \ 176 + (long) &init_stack, \ 177 + .pc = 0, \ 178 + .kregs = &fake_swapper_regs, \ 179 + .uregs = NULL, \ 180 + .trap_no = 0, \ 181 + .error_code = 0, \ 182 + .address = 0, \ 183 + .fpu = { { { 0, } }, } \ 184 + } 185 + 186 + /* 187 + * Do necessary setup to start up a newly executed thread. 188 + */ 189 + #define SR_USER (SR_MMU | SR_FD) 190 + 191 + #define start_thread(regs, new_pc, new_sp) \ 192 + set_fs(USER_DS); \ 193 + regs->sr = SR_USER; /* User mode. */ \ 194 + regs->pc = new_pc - 4; /* Compensate syscall exit */ \ 195 + regs->pc |= 1; /* Set SHmedia ! */ \ 196 + regs->regs[18] = 0; \ 197 + regs->regs[15] = new_sp 198 + 199 + /* Forward declaration, a strange C thing */ 200 + struct task_struct; 201 + struct mm_struct; 202 + 203 + /* Free all resources held by a thread. */ 204 + extern void release_thread(struct task_struct *); 205 + /* 206 + * create a kernel thread without removing it from tasklists 207 + */ 208 + extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); 209 + 210 + 211 + /* Copy and release all segment info associated with a VM */ 212 + #define copy_segments(p, mm) do { } while (0) 213 + #define release_segments(mm) do { } while (0) 214 + #define forget_segments() do { } while (0) 215 + #define prepare_to_copy(tsk) do { } while (0) 216 + /* 217 + * FPU lazy state save handling. 218 + */ 219 + 220 + static inline void disable_fpu(void) 221 + { 222 + unsigned long long __dummy; 223 + 224 + /* Set FD flag in SR */ 225 + __asm__ __volatile__("getcon " __SR ", %0\n\t" 226 + "or %0, %1, %0\n\t" 227 + "putcon %0, " __SR "\n\t" 228 + : "=&r" (__dummy) 229 + : "r" (SR_FD)); 230 + } 231 + 232 + static inline void enable_fpu(void) 233 + { 234 + unsigned long long __dummy; 235 + 236 + /* Clear out FD flag in SR */ 237 + __asm__ __volatile__("getcon " __SR ", %0\n\t" 238 + "and %0, %1, %0\n\t" 239 + "putcon %0, " __SR "\n\t" 240 + : "=&r" (__dummy) 241 + : "r" (~SR_FD)); 242 + } 243 + 244 + /* Round to nearest, no exceptions on inexact, overflow, underflow, 245 + zero-divide, invalid. Configure option for whether to flush denorms to 246 + zero, or except if a denorm is encountered. */ 247 + #if defined(CONFIG_SH64_FPU_DENORM_FLUSH) 248 + #define FPSCR_INIT 0x00040000 249 + #else 250 + #define FPSCR_INIT 0x00000000 251 + #endif 252 + 253 + #ifdef CONFIG_SH_FPU 254 + /* Initialise the FP state of a task */ 255 + void fpinit(struct sh_fpu_hard_struct *fpregs); 256 + #else 257 + #define fpinit(fpregs) do { } while (0) 258 + #endif 259 + 260 + extern struct task_struct *last_task_used_math; 261 + 262 + /* 263 + * Return saved PC of a blocked thread. 264 + */ 265 + #define thread_saved_pc(tsk) (tsk->thread.pc) 266 + 267 + extern unsigned long get_wchan(struct task_struct *p); 268 + 269 + #define KSTK_EIP(tsk) ((tsk)->thread.pc) 270 + #define KSTK_ESP(tsk) ((tsk)->thread.sp) 271 + 272 + #define cpu_relax() barrier() 273 + 274 + #endif /* __ASSEMBLY__ */ 275 + #endif /* __ASM_SH_PROCESSOR_64_H */
+16
arch/sh/include/asm/rtc.h
··· 1 + #ifndef _ASM_RTC_H 2 + #define _ASM_RTC_H 3 + 4 + extern void (*board_time_init)(void); 5 + extern void (*rtc_sh_get_time)(struct timespec *); 6 + extern int (*rtc_sh_set_time)(const time_t); 7 + 8 + #define RTC_CAP_4_DIGIT_YEAR (1 << 0) 9 + 10 + struct sh_rtc_platform_info { 11 + unsigned long capabilities; 12 + }; 13 + 14 + #include <cpu/rtc.h> 15 + 16 + #endif /* _ASM_RTC_H */
+36
arch/sh/include/asm/serial.h
··· 1 + /* 2 + * include/asm-sh/serial.h 3 + * 4 + * Configuration details for 8250, 16450, 16550, etc. serial ports 5 + */ 6 + 7 + #ifndef _ASM_SERIAL_H 8 + #define _ASM_SERIAL_H 9 + 10 + #include <linux/kernel.h> 11 + 12 + /* 13 + * This assumes you have a 1.8432 MHz clock for your UART. 14 + * 15 + * It'd be nice if someone built a serial card with a 24.576 MHz 16 + * clock, since the 16550A is capable of handling a top speed of 1.5 17 + * megabits/second; but this requires the faster clock. 18 + */ 19 + #define BASE_BAUD ( 1843200 / 16 ) 20 + 21 + #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) 22 + 23 + #ifdef CONFIG_HD64465 24 + #include <asm/hd64465/hd64465.h> 25 + 26 + #define SERIAL_PORT_DFNS \ 27 + /* UART CLK PORT IRQ FLAGS */ \ 28 + { 0, BASE_BAUD, 0x3F8, HD64465_IRQ_UART, STD_COM_FLAGS } /* ttyS0 */ 29 + 30 + #else 31 + 32 + #define SERIAL_PORT_DFNS 33 + 34 + #endif 35 + 36 + #endif /* _ASM_SERIAL_H */
+44
arch/sh/include/asm/timer.h
··· 1 + #ifndef __ASM_SH_TIMER_H 2 + #define __ASM_SH_TIMER_H 3 + 4 + #include <linux/sysdev.h> 5 + #include <linux/clocksource.h> 6 + #include <cpu/timer.h> 7 + 8 + struct sys_timer_ops { 9 + int (*init)(void); 10 + int (*start)(void); 11 + int (*stop)(void); 12 + cycle_t (*read)(void); 13 + #ifndef CONFIG_GENERIC_TIME 14 + unsigned long (*get_offset)(void); 15 + #endif 16 + }; 17 + 18 + struct sys_timer { 19 + const char *name; 20 + 21 + struct sys_device dev; 22 + struct sys_timer_ops *ops; 23 + }; 24 + 25 + #define TICK_SIZE (tick_nsec / 1000) 26 + 27 + extern struct sys_timer tmu_timer, cmt_timer, mtu2_timer; 28 + extern struct sys_timer *sys_timer; 29 + 30 + #ifndef CONFIG_GENERIC_TIME 31 + static inline unsigned long get_timer_offset(void) 32 + { 33 + return sys_timer->ops->get_offset(); 34 + } 35 + #endif 36 + 37 + /* arch/sh/kernel/timers/timer.c */ 38 + struct sys_timer *get_sys_timer(void); 39 + 40 + /* arch/sh/kernel/time.c */ 41 + void handle_timer_tick(void); 42 + extern unsigned long sh_hpt_frequency; 43 + 44 + #endif /* __ASM_SH_TIMER_H */
+64
arch/sh/include/asm/ubc.h
··· 1 + /* 2 + * include/asm-sh/ubc.h 3 + * 4 + * Copyright (C) 1999 Niibe Yutaka 5 + * Copyright (C) 2002, 2003 Paul Mundt 6 + * 7 + * This file is subject to the terms and conditions of the GNU General Public 8 + * License. See the file "COPYING" in the main directory of this archive 9 + * for more details. 10 + */ 11 + #ifndef __ASM_SH_UBC_H 12 + #define __ASM_SH_UBC_H 13 + #ifdef __KERNEL__ 14 + 15 + #include <cpu/ubc.h> 16 + 17 + /* User Break Controller */ 18 + #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) 19 + #define UBC_TYPE_SH7729 (current_cpu_data.type == CPU_SH7729) 20 + #else 21 + #define UBC_TYPE_SH7729 0 22 + #endif 23 + 24 + #define BAMR_ASID (1 << 2) 25 + #define BAMR_NONE 0 26 + #define BAMR_10 0x1 27 + #define BAMR_12 0x2 28 + #define BAMR_ALL 0x3 29 + #define BAMR_16 0x8 30 + #define BAMR_20 0x9 31 + 32 + #define BBR_INST (1 << 4) 33 + #define BBR_DATA (2 << 4) 34 + #define BBR_READ (1 << 2) 35 + #define BBR_WRITE (2 << 2) 36 + #define BBR_BYTE 0x1 37 + #define BBR_HALF 0x2 38 + #define BBR_LONG 0x3 39 + #define BBR_QUAD (1 << 6) /* SH7750 */ 40 + #define BBR_CPU (1 << 6) /* SH7709A,SH7729 */ 41 + #define BBR_DMA (2 << 6) /* SH7709A,SH7729 */ 42 + 43 + #define BRCR_CMFA (1 << 15) 44 + #define BRCR_CMFB (1 << 14) 45 + #define BRCR_PCTE (1 << 11) 46 + #define BRCR_PCBA (1 << 10) /* 1: after execution */ 47 + #define BRCR_DBEB (1 << 7) 48 + #define BRCR_PCBB (1 << 6) 49 + #define BRCR_SEQ (1 << 3) 50 + #define BRCR_UBDE (1 << 0) 51 + 52 + #ifndef __ASSEMBLY__ 53 + /* arch/sh/kernel/cpu/ubc.S */ 54 + extern void ubc_sleep(void); 55 + 56 + #ifdef CONFIG_UBC_WAKEUP 57 + extern void ubc_wakeup(void); 58 + #else 59 + #define ubc_wakeup() do { } while (0) 60 + #endif 61 + #endif 62 + 63 + #endif /* __KERNEL__ */ 64 + #endif /* __ASM_SH_UBC_H */
+107
arch/sh/include/asm/watchdog.h
··· 1 + /* 2 + * include/asm-sh/watchdog.h 3 + * 4 + * Copyright (C) 2002, 2003 Paul Mundt 5 + * 6 + * This program is free software; you can redistribute it and/or modify it 7 + * under the terms of the GNU General Public License as published by the 8 + * Free Software Foundation; either version 2 of the License, or (at your 9 + * option) any later version. 10 + */ 11 + #ifndef __ASM_SH_WATCHDOG_H 12 + #define __ASM_SH_WATCHDOG_H 13 + #ifdef __KERNEL__ 14 + 15 + #include <linux/types.h> 16 + #include <cpu/watchdog.h> 17 + #include <asm/io.h> 18 + 19 + /* 20 + * See cpu-sh2/watchdog.h for explanation of this stupidity.. 21 + */ 22 + #ifndef WTCNT_R 23 + # define WTCNT_R WTCNT 24 + #endif 25 + 26 + #ifndef WTCSR_R 27 + # define WTCSR_R WTCSR 28 + #endif 29 + 30 + #define WTCNT_HIGH 0x5a 31 + #define WTCSR_HIGH 0xa5 32 + 33 + #define WTCSR_CKS2 0x04 34 + #define WTCSR_CKS1 0x02 35 + #define WTCSR_CKS0 0x01 36 + 37 + /* 38 + * CKS0-2 supports a number of clock division ratios. At the time the watchdog 39 + * is enabled, it defaults to a 41 usec overflow period .. we overload this to 40 + * something a little more reasonable, and really can't deal with anything 41 + * lower than WTCSR_CKS_1024, else we drop back into the usec range. 42 + * 43 + * Clock Division Ratio Overflow Period 44 + * -------------------------------------------- 45 + * 1/32 (initial value) 41 usecs 46 + * 1/64 82 usecs 47 + * 1/128 164 usecs 48 + * 1/256 328 usecs 49 + * 1/512 656 usecs 50 + * 1/1024 1.31 msecs 51 + * 1/2048 2.62 msecs 52 + * 1/4096 5.25 msecs 53 + */ 54 + #define WTCSR_CKS_32 0x00 55 + #define WTCSR_CKS_64 0x01 56 + #define WTCSR_CKS_128 0x02 57 + #define WTCSR_CKS_256 0x03 58 + #define WTCSR_CKS_512 0x04 59 + #define WTCSR_CKS_1024 0x05 60 + #define WTCSR_CKS_2048 0x06 61 + #define WTCSR_CKS_4096 0x07 62 + 63 + /** 64 + * sh_wdt_read_cnt - Read from Counter 65 + * Reads back the WTCNT value. 66 + */ 67 + static inline __u8 sh_wdt_read_cnt(void) 68 + { 69 + return ctrl_inb(WTCNT_R); 70 + } 71 + 72 + /** 73 + * sh_wdt_write_cnt - Write to Counter 74 + * @val: Value to write 75 + * 76 + * Writes the given value @val to the lower byte of the timer counter. 77 + * The upper byte is set manually on each write. 78 + */ 79 + static inline void sh_wdt_write_cnt(__u8 val) 80 + { 81 + ctrl_outw((WTCNT_HIGH << 8) | (__u16)val, WTCNT); 82 + } 83 + 84 + /** 85 + * sh_wdt_read_csr - Read from Control/Status Register 86 + * 87 + * Reads back the WTCSR value. 88 + */ 89 + static inline __u8 sh_wdt_read_csr(void) 90 + { 91 + return ctrl_inb(WTCSR_R); 92 + } 93 + 94 + /** 95 + * sh_wdt_write_csr - Write to Control/Status Register 96 + * @val: Value to write 97 + * 98 + * Writes the given value @val to the lower byte of the control/status 99 + * register. The upper byte is set manually on each write. 100 + */ 101 + static inline void sh_wdt_write_csr(__u8 val) 102 + { 103 + ctrl_outw((WTCSR_HIGH << 8) | (__u16)val, WTCSR); 104 + } 105 + 106 + #endif /* __KERNEL__ */ 107 + #endif /* __ASM_SH_WATCHDOG_H */
+44
arch/sh/include/cpu-sh2a/cpu/cacheflush.h
··· 1 + /* 2 + * include/asm-sh/cpu-sh2/cacheflush.h 3 + * 4 + * Copyright (C) 2003 Paul Mundt 5 + * 6 + * This file is subject to the terms and conditions of the GNU General Public 7 + * License. See the file "COPYING" in the main directory of this archive 8 + * for more details. 9 + */ 10 + #ifndef __ASM_CPU_SH2_CACHEFLUSH_H 11 + #define __ASM_CPU_SH2_CACHEFLUSH_H 12 + 13 + /* 14 + * Cache flushing: 15 + * 16 + * - flush_cache_all() flushes entire cache 17 + * - flush_cache_mm(mm) flushes the specified mm context's cache lines 18 + * - flush_cache_dup mm(mm) handles cache flushing when forking 19 + * - flush_cache_page(mm, vmaddr, pfn) flushes a single page 20 + * - flush_cache_range(vma, start, end) flushes a range of pages 21 + * 22 + * - flush_dcache_page(pg) flushes(wback&invalidates) a page for dcache 23 + * - flush_icache_range(start, end) flushes(invalidates) a range for icache 24 + * - flush_icache_page(vma, pg) flushes(invalidates) a page for icache 25 + * 26 + * Caches are indexed (effectively) by physical address on SH-2, so 27 + * we don't need them. 28 + */ 29 + #define flush_cache_all() do { } while (0) 30 + #define flush_cache_mm(mm) do { } while (0) 31 + #define flush_cache_dup_mm(mm) do { } while (0) 32 + #define flush_cache_range(vma, start, end) do { } while (0) 33 + #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) 34 + #define flush_dcache_page(page) do { } while (0) 35 + #define flush_dcache_mmap_lock(mapping) do { } while (0) 36 + #define flush_dcache_mmap_unlock(mapping) do { } while (0) 37 + #define flush_icache_range(start, end) do { } while (0) 38 + #define flush_icache_page(vma,pg) do { } while (0) 39 + #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) 40 + #define flush_cache_sigtramp(vaddr) do { } while (0) 41 + 42 + #define p3_cache_init() do { } while (0) 43 + #endif /* __ASM_CPU_SH2_CACHEFLUSH_H */ 44 +
+23
arch/sh/include/cpu-sh2a/cpu/dma.h
··· 1 + /* 2 + * Definitions for the SH-2 DMAC. 3 + * 4 + * Copyright (C) 2003 Paul Mundt 5 + * 6 + * This file is subject to the terms and conditions of the GNU General Public 7 + * License. See the file "COPYING" in the main directory of this archive 8 + * for more details. 9 + */ 10 + #ifndef __ASM_CPU_SH2_DMA_H 11 + #define __ASM_CPU_SH2_DMA_H 12 + 13 + #define SH_MAX_DMA_CHANNELS 2 14 + 15 + #define SAR ((unsigned long[]){ 0xffffff80, 0xffffff90 }) 16 + #define DAR ((unsigned long[]){ 0xffffff84, 0xffffff94 }) 17 + #define DMATCR ((unsigned long[]){ 0xffffff88, 0xffffff98 }) 18 + #define CHCR ((unsigned long[]){ 0xfffffffc, 0xffffff9c }) 19 + 20 + #define DMAOR 0xffffffb0 21 + 22 + #endif /* __ASM_CPU_SH2_DMA_H */ 23 +
+16
arch/sh/include/cpu-sh2a/cpu/mmu_context.h
··· 1 + /* 2 + * include/asm-sh/cpu-sh2/mmu_context.h 3 + * 4 + * Copyright (C) 2003 Paul Mundt 5 + * 6 + * This file is subject to the terms and conditions of the GNU General Public 7 + * License. See the file "COPYING" in the main directory of this archive 8 + * for more details. 9 + */ 10 + #ifndef __ASM_CPU_SH2_MMU_CONTEXT_H 11 + #define __ASM_CPU_SH2_MMU_CONTEXT_H 12 + 13 + /* No MMU */ 14 + 15 + #endif /* __ASM_CPU_SH2_MMU_CONTEXT_H */ 16 +
+6
arch/sh/include/cpu-sh2a/cpu/timer.h
··· 1 + #ifndef __ASM_CPU_SH2_TIMER_H 2 + #define __ASM_CPU_SH2_TIMER_H 3 + 4 + /* Nothing needed yet */ 5 + 6 + #endif /* __ASM_CPU_SH2_TIMER_H */
+32
arch/sh/include/cpu-sh2a/cpu/ubc.h
··· 1 + /* 2 + * include/asm-sh/cpu-sh2/ubc.h 3 + * 4 + * Copyright (C) 2003 Paul Mundt 5 + * 6 + * This file is subject to the terms and conditions of the GNU General Public 7 + * License. See the file "COPYING" in the main directory of this archive 8 + * for more details. 9 + */ 10 + #ifndef __ASM_CPU_SH2_UBC_H 11 + #define __ASM_CPU_SH2_UBC_H 12 + 13 + #define UBC_BARA 0xffffff40 14 + #define UBC_BAMRA 0xffffff44 15 + #define UBC_BBRA 0xffffff48 16 + #define UBC_BARB 0xffffff60 17 + #define UBC_BAMRB 0xffffff64 18 + #define UBC_BBRB 0xffffff68 19 + #define UBC_BDRB 0xffffff70 20 + #define UBC_BDMRB 0xffffff74 21 + #define UBC_BRCR 0xffffff78 22 + 23 + /* 24 + * We don't have any ASID changes to make in the UBC on the SH-2. 25 + * 26 + * Make these purposely invalid to track misuse. 27 + */ 28 + #define UBC_BASRA 0x00000000 29 + #define UBC_BASRB 0x00000000 30 + 31 + #endif /* __ASM_CPU_SH2_UBC_H */ 32 +
+69
arch/sh/include/cpu-sh2a/cpu/watchdog.h
··· 1 + /* 2 + * include/asm-sh/cpu-sh2/watchdog.h 3 + * 4 + * Copyright (C) 2002, 2003 Paul Mundt 5 + * 6 + * This file is subject to the terms and conditions of the GNU General Public 7 + * License. See the file "COPYING" in the main directory of this archive 8 + * for more details. 9 + */ 10 + #ifndef __ASM_CPU_SH2_WATCHDOG_H 11 + #define __ASM_CPU_SH2_WATCHDOG_H 12 + 13 + /* 14 + * More SH-2 brilliance .. its not good enough that we can't read 15 + * and write the same sizes to WTCNT, now we have to read and write 16 + * with different sizes at different addresses for WTCNT _and_ RSTCSR. 17 + * 18 + * At least on the bright side no one has managed to screw over WTCSR 19 + * in this fashion .. yet. 20 + */ 21 + /* Register definitions */ 22 + #define WTCNT 0xfffffe80 23 + #define WTCSR 0xfffffe80 24 + #define RSTCSR 0xfffffe82 25 + 26 + #define WTCNT_R (WTCNT + 1) 27 + #define RSTCSR_R (RSTCSR + 1) 28 + 29 + /* Bit definitions */ 30 + #define WTCSR_IOVF 0x80 31 + #define WTCSR_WT 0x40 32 + #define WTCSR_TME 0x20 33 + #define WTCSR_RSTS 0x00 34 + 35 + #define RSTCSR_RSTS 0x20 36 + 37 + /** 38 + * sh_wdt_read_rstcsr - Read from Reset Control/Status Register 39 + * 40 + * Reads back the RSTCSR value. 41 + */ 42 + static inline __u8 sh_wdt_read_rstcsr(void) 43 + { 44 + /* 45 + * Same read/write brain-damage as for WTCNT here.. 46 + */ 47 + return ctrl_inb(RSTCSR_R); 48 + } 49 + 50 + /** 51 + * sh_wdt_write_csr - Write to Reset Control/Status Register 52 + * 53 + * @val: Value to write 54 + * 55 + * Writes the given value @val to the lower byte of the control/status 56 + * register. The upper byte is set manually on each write. 57 + */ 58 + static inline void sh_wdt_write_rstcsr(__u8 val) 59 + { 60 + /* 61 + * Note: Due to the brain-damaged nature of this register, 62 + * we can't presently touch the WOVF bit, since the upper byte 63 + * has to be swapped for this. So just leave it alone.. 64 + */ 65 + ctrl_outw((WTCNT_HIGH << 8) | (__u16)val, RSTCSR); 66 + } 67 + 68 + #endif /* __ASM_CPU_SH2_WATCHDOG_H */ 69 +
+65
arch/sh/include/cpu-sh4/cpu/dma.h
··· 1 + #ifndef __ASM_CPU_SH4_DMA_H 2 + #define __ASM_CPU_SH4_DMA_H 3 + 4 + #define DMAOR_INIT ( 0x8000 | DMAOR_DME ) 5 + 6 + /* SH7751/7760/7780 DMA IRQ sources */ 7 + #define DMTE0_IRQ 34 8 + #define DMTE1_IRQ 35 9 + #define DMTE2_IRQ 36 10 + #define DMTE3_IRQ 37 11 + #define DMTE4_IRQ 44 12 + #define DMTE5_IRQ 45 13 + #define DMTE6_IRQ 46 14 + #define DMTE7_IRQ 47 15 + #define DMAE_IRQ 38 16 + 17 + #ifdef CONFIG_CPU_SH4A 18 + #define SH_DMAC_BASE 0xfc808020 19 + 20 + #define CHCR_TS_MASK 0x18 21 + #define CHCR_TS_SHIFT 3 22 + 23 + #include <cpu/dma-sh7780.h> 24 + #else 25 + #define SH_DMAC_BASE 0xffa00000 26 + 27 + /* Definitions for the SuperH DMAC */ 28 + #define TM_BURST 0x0000080 29 + #define TS_8 0x00000010 30 + #define TS_16 0x00000020 31 + #define TS_32 0x00000030 32 + #define TS_64 0x00000000 33 + 34 + #define CHCR_TS_MASK 0x70 35 + #define CHCR_TS_SHIFT 4 36 + 37 + #define DMAOR_COD 0x00000008 38 + 39 + /* 40 + * The SuperH DMAC supports a number of transmit sizes, we list them here, 41 + * with their respective values as they appear in the CHCR registers. 42 + * 43 + * Defaults to a 64-bit transfer size. 44 + */ 45 + enum { 46 + XMIT_SZ_64BIT, 47 + XMIT_SZ_8BIT, 48 + XMIT_SZ_16BIT, 49 + XMIT_SZ_32BIT, 50 + XMIT_SZ_256BIT, 51 + }; 52 + 53 + /* 54 + * The DMA count is defined as the number of bytes to transfer. 55 + */ 56 + static unsigned int ts_shift[] __maybe_unused = { 57 + [XMIT_SZ_64BIT] = 3, 58 + [XMIT_SZ_8BIT] = 0, 59 + [XMIT_SZ_16BIT] = 1, 60 + [XMIT_SZ_32BIT] = 2, 61 + [XMIT_SZ_256BIT] = 5, 62 + }; 63 + #endif 64 + 65 + #endif /* __ASM_CPU_SH4_DMA_H */
+25
arch/sh/include/mach-dreamcast/mach/pci.h
··· 1 + /* 2 + * include/asm-sh/dreamcast/pci.h 3 + * 4 + * Copyright (C) 2001, 2002 M. R. Brown 5 + * Copyright (C) 2002, 2003 Paul Mundt 6 + * 7 + * This file is subject to the terms and conditions of the GNU General Public 8 + * License. See the file "COPYING" in the main directory of this archive 9 + * for more details. 10 + */ 11 + #ifndef __ASM_SH_DREAMCAST_PCI_H 12 + #define __ASM_SH_DREAMCAST_PCI_H 13 + 14 + #include <mach/sysasic.h> 15 + 16 + #define GAPSPCI_REGS 0x01001400 17 + #define GAPSPCI_DMA_BASE 0x01840000 18 + #define GAPSPCI_DMA_SIZE 32768 19 + #define GAPSPCI_BBA_CONFIG 0x01001600 20 + #define GAPSPCI_BBA_CONFIG_SIZE 0x2000 21 + 22 + #define GAPSPCI_IRQ HW_EVENT_EXTERNAL 23 + 24 + #endif /* __ASM_SH_DREAMCAST_PCI_H */ 25 +
+1 -1
arch/sh/kernel/cpu/irq/intc-sh5.c
··· 20 20 #include <linux/io.h> 21 21 #include <linux/kernel.h> 22 22 #include <linux/bitops.h> 23 - #include <asm/cpu/irq.h> 23 + #include <cpu/irq.h> 24 24 #include <asm/page.h> 25 25 26 26 /*
+1 -1
arch/sh/kernel/cpu/sh2/entry.S
··· 14 14 #include <linux/linkage.h> 15 15 #include <asm/asm-offsets.h> 16 16 #include <asm/thread_info.h> 17 - #include <asm/cpu/mmu_context.h> 17 + #include <cpu/mmu_context.h> 18 18 #include <asm/unistd.h> 19 19 #include <asm/errno.h> 20 20 #include <asm/page.h>
+1 -1
arch/sh/kernel/cpu/sh2a/entry.S
··· 14 14 #include <linux/linkage.h> 15 15 #include <asm/asm-offsets.h> 16 16 #include <asm/thread_info.h> 17 - #include <asm/cpu/mmu_context.h> 17 + #include <cpu/mmu_context.h> 18 18 #include <asm/unistd.h> 19 19 #include <asm/errno.h> 20 20 #include <asm/page.h>
+1 -1
arch/sh/kernel/cpu/sh3/entry.S
··· 14 14 #include <asm/asm-offsets.h> 15 15 #include <asm/thread_info.h> 16 16 #include <asm/unistd.h> 17 - #include <asm/cpu/mmu_context.h> 17 + #include <cpu/mmu_context.h> 18 18 #include <asm/page.h> 19 19 20 20 ! NOTE:
+1 -1
arch/sh/kernel/cpu/sh4/fpu.c
··· 13 13 #include <linux/sched.h> 14 14 #include <linux/signal.h> 15 15 #include <linux/io.h> 16 - #include <asm/cpu/fpu.h> 16 + #include <cpu/fpu.h> 17 17 #include <asm/processor.h> 18 18 #include <asm/system.h> 19 19 #include <asm/fpu.h>
+1 -1
arch/sh/kernel/cpu/sh4/softfloat.c
··· 36 36 * and Kamel Khelifi <kamel.khelifi@st.com> 37 37 */ 38 38 #include <linux/kernel.h> 39 - #include <asm/cpu/fpu.h> 39 + #include <cpu/fpu.h> 40 40 41 41 #define LIT64( a ) a##LL 42 42
+1 -1
arch/sh/kernel/cpu/sh4/sq.c
··· 22 22 #include <linux/io.h> 23 23 #include <asm/page.h> 24 24 #include <asm/cacheflush.h> 25 - #include <asm/cpu/sq.h> 25 + #include <cpu/sq.h> 26 26 27 27 struct sq_mapping; 28 28
+1 -1
arch/sh/kernel/cpu/sh5/entry.S
··· 11 11 */ 12 12 #include <linux/errno.h> 13 13 #include <linux/sys.h> 14 - #include <asm/cpu/registers.h> 14 + #include <cpu/registers.h> 15 15 #include <asm/processor.h> 16 16 #include <asm/unistd.h> 17 17 #include <asm/thread_info.h>
+2 -2
arch/sh/kernel/head_64.S
··· 11 11 #include <asm/page.h> 12 12 #include <asm/cache.h> 13 13 #include <asm/tlb.h> 14 - #include <asm/cpu/registers.h> 15 - #include <asm/cpu/mmu_context.h> 14 + #include <cpu/registers.h> 15 + #include <cpu/mmu_context.h> 16 16 #include <asm/thread_info.h> 17 17 18 18 /*
+1 -1
arch/sh/kernel/irq.c
··· 15 15 #include <asm/machvec.h> 16 16 #include <asm/uaccess.h> 17 17 #include <asm/thread_info.h> 18 - #include <asm/cpu/mmu_context.h> 18 + #include <cpu/mmu_context.h> 19 19 20 20 atomic_t irq_err_count; 21 21
+2 -2
arch/sh/kernel/time_64.c
··· 33 33 #include <linux/irq.h> 34 34 #include <linux/io.h> 35 35 #include <linux/platform_device.h> 36 - #include <asm/cpu/registers.h> /* required by inline __asm__ stmt. */ 37 - #include <asm/cpu/irq.h> 36 + #include <cpu/registers.h> /* required by inline __asm__ stmt. */ 37 + #include <cpu/irq.h> 38 38 #include <asm/addrspace.h> 39 39 #include <asm/processor.h> 40 40 #include <asm/uaccess.h>
+1 -1
arch/sh/lib64/panic.c
··· 8 8 9 9 #include <linux/kernel.h> 10 10 #include <asm/io.h> 11 - #include <asm/cpu/registers.h> 11 + #include <cpu/registers.h> 12 12 13 13 /* THIS IS A PHYSICAL ADDRESS */ 14 14 #define HDSP2534_ADDR (0x04002100)
+1 -1
arch/sh/mm/fault_64.c
··· 39 39 #include <asm/uaccess.h> 40 40 #include <asm/pgalloc.h> 41 41 #include <asm/mmu_context.h> 42 - #include <asm/cpu/registers.h> 42 + #include <cpu/registers.h> 43 43 44 44 /* Callable from fault.c, so not static */ 45 45 inline void __do_tlb_refill(unsigned long address,
+2 -2
arch/sh/tools/Makefile
··· 10 10 # Shamelessly cloned from ARM. 11 11 # 12 12 13 - include/asm-sh/machtypes.h: $(src)/gen-mach-types $(src)/mach-types 13 + arch/sh/include/asm/machtypes.h: $(src)/gen-mach-types $(src)/mach-types 14 14 @echo ' Generating $@' 15 - $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi 15 + $(Q)if [ ! -d arch/sh/include/asm ]; then mkdir -p arch/sh/include/asm; fi 16 16 $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }
-3
include/asm-sh/.gitignore
··· 1 - cpu 2 - mach 3 - machtypes.h
include/asm-sh/Kbuild arch/sh/include/asm/Kbuild
include/asm-sh/a.out.h arch/sh/include/asm/a.out.h
-13
include/asm-sh/adc.h
··· 1 - #ifndef __ASM_ADC_H 2 - #define __ASM_ADC_H 3 - #ifdef __KERNEL__ 4 - /* 5 - * Copyright (C) 2004 Andriy Skulysh 6 - */ 7 - 8 - #include <asm/cpu/adc.h> 9 - 10 - int adc_single(unsigned int channel); 11 - 12 - #endif /* __KERNEL__ */ 13 - #endif /* __ASM_ADC_H */
-53
include/asm-sh/addrspace.h
··· 1 - /* 2 - * This file is subject to the terms and conditions of the GNU General Public 3 - * License. See the file "COPYING" in the main directory of this archive 4 - * for more details. 5 - * 6 - * Copyright (C) 1999 by Kaz Kojima 7 - * 8 - * Defitions for the address spaces of the SH CPUs. 9 - */ 10 - #ifndef __ASM_SH_ADDRSPACE_H 11 - #define __ASM_SH_ADDRSPACE_H 12 - 13 - #ifdef __KERNEL__ 14 - 15 - #include <asm/cpu/addrspace.h> 16 - 17 - /* If this CPU supports segmentation, hook up the helpers */ 18 - #ifdef P1SEG 19 - 20 - /* 21 - [ P0/U0 (virtual) ] 0x00000000 <------ User space 22 - [ P1 (fixed) cached ] 0x80000000 <------ Kernel space 23 - [ P2 (fixed) non-cachable] 0xA0000000 <------ Physical access 24 - [ P3 (virtual) cached] 0xC0000000 <------ vmalloced area 25 - [ P4 control ] 0xE0000000 26 - */ 27 - 28 - /* Returns the privileged segment base of a given address */ 29 - #define PXSEG(a) (((unsigned long)(a)) & 0xe0000000) 30 - 31 - /* Returns the physical address of a PnSEG (n=1,2) address */ 32 - #define PHYSADDR(a) (((unsigned long)(a)) & 0x1fffffff) 33 - 34 - #ifdef CONFIG_29BIT 35 - /* 36 - * Map an address to a certain privileged segment 37 - */ 38 - #define P1SEGADDR(a) \ 39 - ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P1SEG)) 40 - #define P2SEGADDR(a) \ 41 - ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P2SEG)) 42 - #define P3SEGADDR(a) \ 43 - ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P3SEG)) 44 - #define P4SEGADDR(a) \ 45 - ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P4SEG)) 46 - #endif /* 29BIT */ 47 - #endif /* P1SEG */ 48 - 49 - /* Check if an address can be reached in 29 bits */ 50 - #define IS_29BIT(a) (((unsigned long)(a)) < 0x20000000) 51 - 52 - #endif /* __KERNEL__ */ 53 - #endif /* __ASM_SH_ADDRSPACE_H */
include/asm-sh/atomic-grb.h arch/sh/include/asm/atomic-grb.h
include/asm-sh/atomic-irq.h arch/sh/include/asm/atomic-irq.h
include/asm-sh/atomic-llsc.h arch/sh/include/asm/atomic-llsc.h
include/asm-sh/atomic.h arch/sh/include/asm/atomic.h
include/asm-sh/auxvec.h arch/sh/include/asm/auxvec.h
include/asm-sh/bitops-grb.h arch/sh/include/asm/bitops-grb.h
include/asm-sh/bitops-irq.h arch/sh/include/asm/bitops-irq.h
include/asm-sh/bitops.h arch/sh/include/asm/bitops.h
include/asm-sh/bug.h arch/sh/include/asm/bug.h
include/asm-sh/bugs.h arch/sh/include/asm/bugs.h
include/asm-sh/byteorder.h arch/sh/include/asm/byteorder.h
-51
include/asm-sh/cache.h
··· 1 - /* $Id: cache.h,v 1.6 2004/03/11 18:08:05 lethal Exp $ 2 - * 3 - * include/asm-sh/cache.h 4 - * 5 - * Copyright 1999 (C) Niibe Yutaka 6 - * Copyright 2002, 2003 (C) Paul Mundt 7 - */ 8 - #ifndef __ASM_SH_CACHE_H 9 - #define __ASM_SH_CACHE_H 10 - #ifdef __KERNEL__ 11 - 12 - #include <linux/init.h> 13 - #include <asm/cpu/cache.h> 14 - 15 - #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) 16 - 17 - #define __read_mostly __attribute__((__section__(".data.read_mostly"))) 18 - 19 - #ifndef __ASSEMBLY__ 20 - struct cache_info { 21 - unsigned int ways; /* Number of cache ways */ 22 - unsigned int sets; /* Number of cache sets */ 23 - unsigned int linesz; /* Cache line size (bytes) */ 24 - 25 - unsigned int way_size; /* sets * line size */ 26 - 27 - /* 28 - * way_incr is the address offset for accessing the next way 29 - * in memory mapped cache array ops. 30 - */ 31 - unsigned int way_incr; 32 - unsigned int entry_shift; 33 - unsigned int entry_mask; 34 - 35 - /* 36 - * Compute a mask which selects the address bits which overlap between 37 - * 1. those used to select the cache set during indexing 38 - * 2. those in the physical page number. 39 - */ 40 - unsigned int alias_mask; 41 - 42 - unsigned int n_aliases; /* Number of aliases */ 43 - 44 - unsigned long flags; 45 - }; 46 - 47 - int __init detect_cpu_and_cache_system(void); 48 - 49 - #endif /* __ASSEMBLY__ */ 50 - #endif /* __KERNEL__ */ 51 - #endif /* __ASM_SH_CACHE_H */
-81
include/asm-sh/cacheflush.h
··· 1 - #ifndef __ASM_SH_CACHEFLUSH_H 2 - #define __ASM_SH_CACHEFLUSH_H 3 - 4 - #ifdef __KERNEL__ 5 - 6 - #ifdef CONFIG_CACHE_OFF 7 - /* 8 - * Nothing to do when the cache is disabled, initial flush and explicit 9 - * disabling is handled at CPU init time. 10 - * 11 - * See arch/sh/kernel/cpu/init.c:cache_init(). 12 - */ 13 - #define p3_cache_init() do { } while (0) 14 - #define flush_cache_all() do { } while (0) 15 - #define flush_cache_mm(mm) do { } while (0) 16 - #define flush_cache_dup_mm(mm) do { } while (0) 17 - #define flush_cache_range(vma, start, end) do { } while (0) 18 - #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) 19 - #define flush_dcache_page(page) do { } while (0) 20 - #define flush_icache_range(start, end) do { } while (0) 21 - #define flush_icache_page(vma,pg) do { } while (0) 22 - #define flush_dcache_mmap_lock(mapping) do { } while (0) 23 - #define flush_dcache_mmap_unlock(mapping) do { } while (0) 24 - #define flush_cache_sigtramp(vaddr) do { } while (0) 25 - #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) 26 - #define __flush_wback_region(start, size) do { (void)(start); } while (0) 27 - #define __flush_purge_region(start, size) do { (void)(start); } while (0) 28 - #define __flush_invalidate_region(start, size) do { (void)(start); } while (0) 29 - #else 30 - #include <asm/cpu/cacheflush.h> 31 - 32 - /* 33 - * Consistent DMA requires that the __flush_xxx() primitives must be set 34 - * for any of the enabled non-coherent caches (most of the UP CPUs), 35 - * regardless of PIPT or VIPT cache configurations. 36 - */ 37 - 38 - /* Flush (write-back only) a region (smaller than a page) */ 39 - extern void __flush_wback_region(void *start, int size); 40 - /* Flush (write-back & invalidate) a region (smaller than a page) */ 41 - extern void __flush_purge_region(void *start, int size); 42 - /* Flush (invalidate only) a region (smaller than a page) */ 43 - extern void __flush_invalidate_region(void *start, int size); 44 - #endif 45 - 46 - #define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE 47 - static inline void flush_kernel_dcache_page(struct page *page) 48 - { 49 - flush_dcache_page(page); 50 - } 51 - 52 - #if defined(CONFIG_CPU_SH4) && !defined(CONFIG_CACHE_OFF) 53 - extern void copy_to_user_page(struct vm_area_struct *vma, 54 - struct page *page, unsigned long vaddr, void *dst, const void *src, 55 - unsigned long len); 56 - 57 - extern void copy_from_user_page(struct vm_area_struct *vma, 58 - struct page *page, unsigned long vaddr, void *dst, const void *src, 59 - unsigned long len); 60 - #else 61 - #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ 62 - do { \ 63 - flush_cache_page(vma, vaddr, page_to_pfn(page));\ 64 - memcpy(dst, src, len); \ 65 - flush_icache_user_range(vma, page, vaddr, len); \ 66 - } while (0) 67 - 68 - #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ 69 - do { \ 70 - flush_cache_page(vma, vaddr, page_to_pfn(page));\ 71 - memcpy(dst, src, len); \ 72 - } while (0) 73 - #endif 74 - 75 - #define flush_cache_vmap(start, end) flush_cache_all() 76 - #define flush_cache_vunmap(start, end) flush_cache_all() 77 - 78 - #define HAVE_ARCH_UNMAPPED_AREA 79 - 80 - #endif /* __KERNEL__ */ 81 - #endif /* __ASM_SH_CACHEFLUSH_H */
include/asm-sh/checksum.h arch/sh/include/asm/checksum.h
include/asm-sh/checksum_32.h arch/sh/include/asm/checksum_32.h
include/asm-sh/checksum_64.h arch/sh/include/asm/checksum_64.h
include/asm-sh/clock.h arch/sh/include/asm/clock.h
include/asm-sh/cmpxchg-grb.h arch/sh/include/asm/cmpxchg-grb.h
include/asm-sh/cmpxchg-irq.h arch/sh/include/asm/cmpxchg-irq.h
include/asm-sh/cpu-features.h arch/sh/include/asm/cpu-features.h
include/asm-sh/cpu-sh2/addrspace.h arch/sh/include/cpu-sh2/cpu/addrspace.h
include/asm-sh/cpu-sh2/cache.h arch/sh/include/cpu-sh2/cpu/cache.h
include/asm-sh/cpu-sh2/cacheflush.h arch/sh/include/cpu-sh2/cpu/cacheflush.h
include/asm-sh/cpu-sh2/dma.h arch/sh/include/cpu-sh2/cpu/dma.h
include/asm-sh/cpu-sh2/freq.h arch/sh/include/cpu-sh2/cpu/freq.h
include/asm-sh/cpu-sh2/mmu_context.h arch/sh/include/cpu-sh2/cpu/mmu_context.h
include/asm-sh/cpu-sh2/rtc.h arch/sh/include/cpu-sh2/cpu/rtc.h
include/asm-sh/cpu-sh2/sigcontext.h arch/sh/include/cpu-sh2/cpu/sigcontext.h
include/asm-sh/cpu-sh2/timer.h arch/sh/include/cpu-sh2/cpu/timer.h
include/asm-sh/cpu-sh2/ubc.h arch/sh/include/cpu-sh2/cpu/ubc.h
include/asm-sh/cpu-sh2/watchdog.h arch/sh/include/cpu-sh2/cpu/watchdog.h
include/asm-sh/cpu-sh2a/addrspace.h arch/sh/include/cpu-sh2a/cpu/addrspace.h
include/asm-sh/cpu-sh2a/cache.h arch/sh/include/cpu-sh2a/cpu/cache.h
-1
include/asm-sh/cpu-sh2a/cacheflush.h
··· 1 - #include <asm/cpu-sh2/cacheflush.h>
-1
include/asm-sh/cpu-sh2a/dma.h
··· 1 - #include <asm/cpu-sh2/dma.h>
include/asm-sh/cpu-sh2a/freq.h arch/sh/include/cpu-sh2a/cpu/freq.h
-1
include/asm-sh/cpu-sh2a/mmu_context.h
··· 1 - #include <asm/cpu-sh2/mmu_context.h>
include/asm-sh/cpu-sh2a/rtc.h arch/sh/include/cpu-sh2a/cpu/rtc.h
-1
include/asm-sh/cpu-sh2a/timer.h
··· 1 - #include <asm/cpu-sh2/timer.h>
-1
include/asm-sh/cpu-sh2a/ubc.h
··· 1 - #include <asm/cpu-sh2/ubc.h>
-1
include/asm-sh/cpu-sh2a/watchdog.h
··· 1 - #include <asm/cpu-sh2/watchdog.h>
include/asm-sh/cpu-sh3/adc.h arch/sh/include/cpu-sh3/cpu/adc.h
include/asm-sh/cpu-sh3/addrspace.h arch/sh/include/cpu-sh3/cpu/addrspace.h
include/asm-sh/cpu-sh3/cache.h arch/sh/include/cpu-sh3/cpu/cache.h
include/asm-sh/cpu-sh3/cacheflush.h arch/sh/include/cpu-sh3/cpu/cacheflush.h
include/asm-sh/cpu-sh3/dac.h arch/sh/include/cpu-sh3/cpu/dac.h
include/asm-sh/cpu-sh3/dma.h arch/sh/include/cpu-sh3/cpu/dma.h
include/asm-sh/cpu-sh3/freq.h arch/sh/include/cpu-sh3/cpu/freq.h
include/asm-sh/cpu-sh3/gpio.h arch/sh/include/cpu-sh3/cpu/gpio.h
include/asm-sh/cpu-sh3/mmu_context.h arch/sh/include/cpu-sh3/cpu/mmu_context.h
include/asm-sh/cpu-sh3/rtc.h arch/sh/include/cpu-sh3/cpu/rtc.h
include/asm-sh/cpu-sh3/sigcontext.h arch/sh/include/cpu-sh3/cpu/sigcontext.h
include/asm-sh/cpu-sh3/timer.h arch/sh/include/cpu-sh3/cpu/timer.h
include/asm-sh/cpu-sh3/ubc.h arch/sh/include/cpu-sh3/cpu/ubc.h
include/asm-sh/cpu-sh3/watchdog.h arch/sh/include/cpu-sh3/cpu/watchdog.h
include/asm-sh/cpu-sh4/addrspace.h arch/sh/include/cpu-sh4/cpu/addrspace.h
include/asm-sh/cpu-sh4/cache.h arch/sh/include/cpu-sh4/cpu/cache.h
include/asm-sh/cpu-sh4/cacheflush.h arch/sh/include/cpu-sh4/cpu/cacheflush.h
include/asm-sh/cpu-sh4/dma-sh7780.h arch/sh/include/cpu-sh4/cpu/dma-sh7780.h
-65
include/asm-sh/cpu-sh4/dma.h
··· 1 - #ifndef __ASM_CPU_SH4_DMA_H 2 - #define __ASM_CPU_SH4_DMA_H 3 - 4 - #define DMAOR_INIT ( 0x8000 | DMAOR_DME ) 5 - 6 - /* SH7751/7760/7780 DMA IRQ sources */ 7 - #define DMTE0_IRQ 34 8 - #define DMTE1_IRQ 35 9 - #define DMTE2_IRQ 36 10 - #define DMTE3_IRQ 37 11 - #define DMTE4_IRQ 44 12 - #define DMTE5_IRQ 45 13 - #define DMTE6_IRQ 46 14 - #define DMTE7_IRQ 47 15 - #define DMAE_IRQ 38 16 - 17 - #ifdef CONFIG_CPU_SH4A 18 - #define SH_DMAC_BASE 0xfc808020 19 - 20 - #define CHCR_TS_MASK 0x18 21 - #define CHCR_TS_SHIFT 3 22 - 23 - #include <asm/cpu/dma-sh7780.h> 24 - #else 25 - #define SH_DMAC_BASE 0xffa00000 26 - 27 - /* Definitions for the SuperH DMAC */ 28 - #define TM_BURST 0x0000080 29 - #define TS_8 0x00000010 30 - #define TS_16 0x00000020 31 - #define TS_32 0x00000030 32 - #define TS_64 0x00000000 33 - 34 - #define CHCR_TS_MASK 0x70 35 - #define CHCR_TS_SHIFT 4 36 - 37 - #define DMAOR_COD 0x00000008 38 - 39 - /* 40 - * The SuperH DMAC supports a number of transmit sizes, we list them here, 41 - * with their respective values as they appear in the CHCR registers. 42 - * 43 - * Defaults to a 64-bit transfer size. 44 - */ 45 - enum { 46 - XMIT_SZ_64BIT, 47 - XMIT_SZ_8BIT, 48 - XMIT_SZ_16BIT, 49 - XMIT_SZ_32BIT, 50 - XMIT_SZ_256BIT, 51 - }; 52 - 53 - /* 54 - * The DMA count is defined as the number of bytes to transfer. 55 - */ 56 - static unsigned int ts_shift[] __maybe_unused = { 57 - [XMIT_SZ_64BIT] = 3, 58 - [XMIT_SZ_8BIT] = 0, 59 - [XMIT_SZ_16BIT] = 1, 60 - [XMIT_SZ_32BIT] = 2, 61 - [XMIT_SZ_256BIT] = 5, 62 - }; 63 - #endif 64 - 65 - #endif /* __ASM_CPU_SH4_DMA_H */
include/asm-sh/cpu-sh4/fpu.h arch/sh/include/cpu-sh4/cpu/fpu.h
include/asm-sh/cpu-sh4/freq.h arch/sh/include/cpu-sh4/cpu/freq.h
include/asm-sh/cpu-sh4/mmu_context.h arch/sh/include/cpu-sh4/cpu/mmu_context.h
include/asm-sh/cpu-sh4/rtc.h arch/sh/include/cpu-sh4/cpu/rtc.h
include/asm-sh/cpu-sh4/sigcontext.h arch/sh/include/cpu-sh4/cpu/sigcontext.h
include/asm-sh/cpu-sh4/sq.h arch/sh/include/cpu-sh4/cpu/sq.h
include/asm-sh/cpu-sh4/timer.h arch/sh/include/cpu-sh4/cpu/timer.h
include/asm-sh/cpu-sh4/ubc.h arch/sh/include/cpu-sh4/cpu/ubc.h
include/asm-sh/cpu-sh4/watchdog.h arch/sh/include/cpu-sh4/cpu/watchdog.h
include/asm-sh/cpu-sh5/addrspace.h arch/sh/include/cpu-sh5/cpu/addrspace.h
include/asm-sh/cpu-sh5/cache.h arch/sh/include/cpu-sh5/cpu/cache.h
include/asm-sh/cpu-sh5/cacheflush.h arch/sh/include/cpu-sh5/cpu/cacheflush.h
include/asm-sh/cpu-sh5/dma.h arch/sh/include/cpu-sh5/cpu/dma.h
include/asm-sh/cpu-sh5/irq.h arch/sh/include/cpu-sh5/cpu/irq.h
include/asm-sh/cpu-sh5/mmu_context.h arch/sh/include/cpu-sh5/cpu/mmu_context.h
include/asm-sh/cpu-sh5/registers.h arch/sh/include/cpu-sh5/cpu/registers.h
include/asm-sh/cpu-sh5/rtc.h arch/sh/include/cpu-sh5/cpu/rtc.h
include/asm-sh/cpu-sh5/timer.h arch/sh/include/cpu-sh5/cpu/timer.h
include/asm-sh/cputime.h arch/sh/include/asm/cputime.h
include/asm-sh/current.h arch/sh/include/asm/current.h
include/asm-sh/delay.h arch/sh/include/asm/delay.h
include/asm-sh/device.h arch/sh/include/asm/device.h
include/asm-sh/div64.h arch/sh/include/asm/div64.h
include/asm-sh/dma-mapping.h arch/sh/include/asm/dma-mapping.h
-166
include/asm-sh/dma.h
··· 1 - /* 2 - * include/asm-sh/dma.h 3 - * 4 - * Copyright (C) 2003, 2004 Paul Mundt 5 - * 6 - * This file is subject to the terms and conditions of the GNU General Public 7 - * License. See the file "COPYING" in the main directory of this archive 8 - * for more details. 9 - */ 10 - #ifndef __ASM_SH_DMA_H 11 - #define __ASM_SH_DMA_H 12 - #ifdef __KERNEL__ 13 - 14 - #include <linux/spinlock.h> 15 - #include <linux/wait.h> 16 - #include <linux/sched.h> 17 - #include <linux/sysdev.h> 18 - #include <asm/cpu/dma.h> 19 - 20 - /* The maximum address that we can perform a DMA transfer to on this platform */ 21 - /* Don't define MAX_DMA_ADDRESS; it's useless on the SuperH and any 22 - occurrence should be flagged as an error. */ 23 - /* But... */ 24 - /* XXX: This is not applicable to SuperH, just needed for alloc_bootmem */ 25 - #define MAX_DMA_ADDRESS (PAGE_OFFSET+0x10000000) 26 - 27 - #ifdef CONFIG_NR_DMA_CHANNELS 28 - # define MAX_DMA_CHANNELS (CONFIG_NR_DMA_CHANNELS) 29 - #else 30 - # define MAX_DMA_CHANNELS (CONFIG_NR_ONCHIP_DMA_CHANNELS) 31 - #endif 32 - 33 - /* 34 - * Read and write modes can mean drastically different things depending on the 35 - * channel configuration. Consult your DMAC documentation and module 36 - * implementation for further clues. 37 - */ 38 - #define DMA_MODE_READ 0x00 39 - #define DMA_MODE_WRITE 0x01 40 - #define DMA_MODE_MASK 0x01 41 - 42 - #define DMA_AUTOINIT 0x10 43 - 44 - /* 45 - * DMAC (dma_info) flags 46 - */ 47 - enum { 48 - DMAC_CHANNELS_CONFIGURED = 0x01, 49 - DMAC_CHANNELS_TEI_CAPABLE = 0x02, /* Transfer end interrupt */ 50 - }; 51 - 52 - /* 53 - * DMA channel capabilities / flags 54 - */ 55 - enum { 56 - DMA_CONFIGURED = 0x01, 57 - 58 - /* 59 - * Transfer end interrupt, inherited from DMAC. 60 - * wait_queue used in dma_wait_for_completion. 61 - */ 62 - DMA_TEI_CAPABLE = 0x02, 63 - }; 64 - 65 - extern spinlock_t dma_spin_lock; 66 - 67 - struct dma_channel; 68 - 69 - struct dma_ops { 70 - int (*request)(struct dma_channel *chan); 71 - void (*free)(struct dma_channel *chan); 72 - 73 - int (*get_residue)(struct dma_channel *chan); 74 - int (*xfer)(struct dma_channel *chan); 75 - int (*configure)(struct dma_channel *chan, unsigned long flags); 76 - int (*extend)(struct dma_channel *chan, unsigned long op, void *param); 77 - }; 78 - 79 - struct dma_channel { 80 - char dev_id[16]; /* unique name per DMAC of channel */ 81 - 82 - unsigned int chan; /* DMAC channel number */ 83 - unsigned int vchan; /* Virtual channel number */ 84 - 85 - unsigned int mode; 86 - unsigned int count; 87 - 88 - unsigned long sar; 89 - unsigned long dar; 90 - 91 - const char **caps; 92 - 93 - unsigned long flags; 94 - atomic_t busy; 95 - 96 - wait_queue_head_t wait_queue; 97 - 98 - struct sys_device dev; 99 - void *priv_data; 100 - }; 101 - 102 - struct dma_info { 103 - struct platform_device *pdev; 104 - 105 - const char *name; 106 - unsigned int nr_channels; 107 - unsigned long flags; 108 - 109 - struct dma_ops *ops; 110 - struct dma_channel *channels; 111 - 112 - struct list_head list; 113 - int first_channel_nr; 114 - int first_vchannel_nr; 115 - }; 116 - 117 - struct dma_chan_caps { 118 - int ch_num; 119 - const char **caplist; 120 - }; 121 - 122 - #define to_dma_channel(channel) container_of(channel, struct dma_channel, dev) 123 - 124 - /* arch/sh/drivers/dma/dma-api.c */ 125 - extern int dma_xfer(unsigned int chan, unsigned long from, 126 - unsigned long to, size_t size, unsigned int mode); 127 - 128 - #define dma_write(chan, from, to, size) \ 129 - dma_xfer(chan, from, to, size, DMA_MODE_WRITE) 130 - #define dma_write_page(chan, from, to) \ 131 - dma_write(chan, from, to, PAGE_SIZE) 132 - 133 - #define dma_read(chan, from, to, size) \ 134 - dma_xfer(chan, from, to, size, DMA_MODE_READ) 135 - #define dma_read_page(chan, from, to) \ 136 - dma_read(chan, from, to, PAGE_SIZE) 137 - 138 - extern int request_dma_bycap(const char **dmac, const char **caps, 139 - const char *dev_id); 140 - extern int request_dma(unsigned int chan, const char *dev_id); 141 - extern void free_dma(unsigned int chan); 142 - extern int get_dma_residue(unsigned int chan); 143 - extern struct dma_info *get_dma_info(unsigned int chan); 144 - extern struct dma_channel *get_dma_channel(unsigned int chan); 145 - extern void dma_wait_for_completion(unsigned int chan); 146 - extern void dma_configure_channel(unsigned int chan, unsigned long flags); 147 - 148 - extern int register_dmac(struct dma_info *info); 149 - extern void unregister_dmac(struct dma_info *info); 150 - extern struct dma_info *get_dma_info_by_name(const char *dmac_name); 151 - 152 - extern int dma_extend(unsigned int chan, unsigned long op, void *param); 153 - extern int register_chan_caps(const char *dmac, struct dma_chan_caps *capslist); 154 - 155 - /* arch/sh/drivers/dma/dma-sysfs.c */ 156 - extern int dma_create_sysfs_files(struct dma_channel *, struct dma_info *); 157 - extern void dma_remove_sysfs_files(struct dma_channel *, struct dma_info *); 158 - 159 - #ifdef CONFIG_PCI 160 - extern int isa_dma_bridge_buggy; 161 - #else 162 - #define isa_dma_bridge_buggy (0) 163 - #endif 164 - 165 - #endif /* __KERNEL__ */ 166 - #endif /* __ASM_SH_DMA_H */
include/asm-sh/dmabrg.h arch/sh/include/asm/dmabrg.h
include/asm-sh/dreamcast/dma.h arch/sh/include/mach-dreamcast/mach/dma.h
include/asm-sh/dreamcast/maple.h arch/sh/include/mach-dreamcast/mach/maple.h
-25
include/asm-sh/dreamcast/pci.h
··· 1 - /* 2 - * include/asm-sh/dreamcast/pci.h 3 - * 4 - * Copyright (C) 2001, 2002 M. R. Brown 5 - * Copyright (C) 2002, 2003 Paul Mundt 6 - * 7 - * This file is subject to the terms and conditions of the GNU General Public 8 - * License. See the file "COPYING" in the main directory of this archive 9 - * for more details. 10 - */ 11 - #ifndef __ASM_SH_DREAMCAST_PCI_H 12 - #define __ASM_SH_DREAMCAST_PCI_H 13 - 14 - #include <asm/mach/sysasic.h> 15 - 16 - #define GAPSPCI_REGS 0x01001400 17 - #define GAPSPCI_DMA_BASE 0x01840000 18 - #define GAPSPCI_DMA_SIZE 32768 19 - #define GAPSPCI_BBA_CONFIG 0x01001600 20 - #define GAPSPCI_BBA_CONFIG_SIZE 0x2000 21 - 22 - #define GAPSPCI_IRQ HW_EVENT_EXTERNAL 23 - 24 - #endif /* __ASM_SH_DREAMCAST_PCI_H */ 25 -
include/asm-sh/dreamcast/sysasic.h arch/sh/include/mach-dreamcast/mach/sysasic.h
include/asm-sh/edosk7705.h arch/sh/include/asm/edosk7705.h
include/asm-sh/elf.h arch/sh/include/asm/elf.h
include/asm-sh/emergency-restart.h arch/sh/include/asm/emergency-restart.h
include/asm-sh/entry-macros.S arch/sh/include/asm/entry-macros.S
include/asm-sh/errno.h arch/sh/include/asm/errno.h
include/asm-sh/fb.h arch/sh/include/asm/fb.h
include/asm-sh/fcntl.h arch/sh/include/asm/fcntl.h
include/asm-sh/fixmap.h arch/sh/include/asm/fixmap.h
include/asm-sh/flat.h arch/sh/include/asm/flat.h
include/asm-sh/fpu.h arch/sh/include/asm/fpu.h
-18
include/asm-sh/freq.h
··· 1 - /* 2 - * include/asm-sh/freq.h 3 - * 4 - * Copyright (C) 2002, 2003 Paul Mundt 5 - * 6 - * This program is free software; you can redistribute it and/or modify it 7 - * under the terms of the GNU General Public License as published by the 8 - * Free Software Foundation; either version 2 of the License, or (at your 9 - * option) any later version. 10 - */ 11 - #ifndef __ASM_SH_FREQ_H 12 - #define __ASM_SH_FREQ_H 13 - #ifdef __KERNEL__ 14 - 15 - #include <asm/cpu/freq.h> 16 - 17 - #endif /* __KERNEL__ */ 18 - #endif /* __ASM_SH_FREQ_H */
include/asm-sh/futex-irq.h arch/sh/include/asm/futex-irq.h
include/asm-sh/futex.h arch/sh/include/asm/futex.h
-19
include/asm-sh/gpio.h
··· 1 - /* 2 - * include/asm-sh/gpio.h 3 - * 4 - * Copyright (C) 2007 Markus Brunner, Mark Jonas 5 - * 6 - * Addresses for the Pin Function Controller 7 - * 8 - * This file is subject to the terms and conditions of the GNU General Public 9 - * License. See the file "COPYING" in the main directory of this archive 10 - * for more details. 11 - */ 12 - #ifndef __ASM_SH_GPIO_H 13 - #define __ASM_SH_GPIO_H 14 - 15 - #if defined(CONFIG_CPU_SH3) 16 - #include <asm/cpu/gpio.h> 17 - #endif 18 - 19 - #endif /* __ASM_SH_GPIO_H */
include/asm-sh/hardirq.h arch/sh/include/asm/hardirq.h
include/asm-sh/hd64461.h arch/sh/include/asm/hd64461.h
include/asm-sh/hd64465/gpio.h arch/sh/include/asm/hd64465/gpio.h
include/asm-sh/hd64465/hd64465.h arch/sh/include/asm/hd64465/hd64465.h
include/asm-sh/hd64465/io.h arch/sh/include/asm/hd64465/io.h
include/asm-sh/heartbeat.h arch/sh/include/asm/heartbeat.h
include/asm-sh/hp6xx.h arch/sh/include/asm/hp6xx.h
include/asm-sh/hugetlb.h arch/sh/include/asm/hugetlb.h
include/asm-sh/hw_irq.h arch/sh/include/asm/hw_irq.h
include/asm-sh/i2c-sh7760.h arch/sh/include/asm/i2c-sh7760.h
include/asm-sh/ilsel.h arch/sh/include/asm/ilsel.h
include/asm-sh/io.h arch/sh/include/asm/io.h
include/asm-sh/io_generic.h arch/sh/include/asm/io_generic.h
include/asm-sh/io_trapped.h arch/sh/include/asm/io_trapped.h
include/asm-sh/ioctl.h arch/sh/include/asm/ioctl.h
include/asm-sh/ioctls.h arch/sh/include/asm/ioctls.h
include/asm-sh/ipcbuf.h arch/sh/include/asm/ipcbuf.h
-57
include/asm-sh/irq.h
··· 1 - #ifndef __ASM_SH_IRQ_H 2 - #define __ASM_SH_IRQ_H 3 - 4 - #include <asm/machvec.h> 5 - 6 - /* 7 - * A sane default based on a reasonable vector table size, platforms are 8 - * advised to cap this at the hard limit that they're interested in 9 - * through the machvec. 10 - */ 11 - #define NR_IRQS 256 12 - 13 - /* 14 - * Convert back and forth between INTEVT and IRQ values. 15 - */ 16 - #ifdef CONFIG_CPU_HAS_INTEVT 17 - #define evt2irq(evt) (((evt) >> 5) - 16) 18 - #define irq2evt(irq) (((irq) + 16) << 5) 19 - #else 20 - #define evt2irq(evt) (evt) 21 - #define irq2evt(irq) (irq) 22 - #endif 23 - 24 - /* 25 - * Simple Mask Register Support 26 - */ 27 - extern void make_maskreg_irq(unsigned int irq); 28 - extern unsigned short *irq_mask_register; 29 - 30 - /* 31 - * PINT IRQs 32 - */ 33 - void init_IRQ_pint(void); 34 - void make_imask_irq(unsigned int irq); 35 - 36 - static inline int generic_irq_demux(int irq) 37 - { 38 - return irq; 39 - } 40 - 41 - #define irq_canonicalize(irq) (irq) 42 - #define irq_demux(irq) sh_mv.mv_irq_demux(irq) 43 - 44 - #ifdef CONFIG_IRQSTACKS 45 - extern void irq_ctx_init(int cpu); 46 - extern void irq_ctx_exit(int cpu); 47 - # define __ARCH_HAS_DO_SOFTIRQ 48 - #else 49 - # define irq_ctx_init(cpu) do { } while (0) 50 - # define irq_ctx_exit(cpu) do { } while (0) 51 - #endif 52 - 53 - #ifdef CONFIG_CPU_SH5 54 - #include <asm/cpu/irq.h> 55 - #endif 56 - 57 - #endif /* __ASM_SH_IRQ_H */
include/asm-sh/irq_regs.h arch/sh/include/asm/irq_regs.h
include/asm-sh/irqflags.h arch/sh/include/asm/irqflags.h
include/asm-sh/irqflags_32.h arch/sh/include/asm/irqflags_32.h
-85
include/asm-sh/irqflags_64.h
··· 1 - #ifndef __ASM_SH_IRQFLAGS_64_H 2 - #define __ASM_SH_IRQFLAGS_64_H 3 - 4 - #include <asm/cpu/registers.h> 5 - 6 - #define SR_MASK_LL 0x00000000000000f0LL 7 - #define SR_BL_LL 0x0000000010000000LL 8 - 9 - static inline void raw_local_irq_enable(void) 10 - { 11 - unsigned long long __dummy0, __dummy1 = ~SR_MASK_LL; 12 - 13 - __asm__ __volatile__("getcon " __SR ", %0\n\t" 14 - "and %0, %1, %0\n\t" 15 - "putcon %0, " __SR "\n\t" 16 - : "=&r" (__dummy0) 17 - : "r" (__dummy1)); 18 - } 19 - 20 - static inline void raw_local_irq_disable(void) 21 - { 22 - unsigned long long __dummy0, __dummy1 = SR_MASK_LL; 23 - 24 - __asm__ __volatile__("getcon " __SR ", %0\n\t" 25 - "or %0, %1, %0\n\t" 26 - "putcon %0, " __SR "\n\t" 27 - : "=&r" (__dummy0) 28 - : "r" (__dummy1)); 29 - } 30 - 31 - static inline void set_bl_bit(void) 32 - { 33 - unsigned long long __dummy0, __dummy1 = SR_BL_LL; 34 - 35 - __asm__ __volatile__("getcon " __SR ", %0\n\t" 36 - "or %0, %1, %0\n\t" 37 - "putcon %0, " __SR "\n\t" 38 - : "=&r" (__dummy0) 39 - : "r" (__dummy1)); 40 - 41 - } 42 - 43 - static inline void clear_bl_bit(void) 44 - { 45 - unsigned long long __dummy0, __dummy1 = ~SR_BL_LL; 46 - 47 - __asm__ __volatile__("getcon " __SR ", %0\n\t" 48 - "and %0, %1, %0\n\t" 49 - "putcon %0, " __SR "\n\t" 50 - : "=&r" (__dummy0) 51 - : "r" (__dummy1)); 52 - } 53 - 54 - static inline unsigned long __raw_local_save_flags(void) 55 - { 56 - unsigned long long __dummy = SR_MASK_LL; 57 - unsigned long flags; 58 - 59 - __asm__ __volatile__ ( 60 - "getcon " __SR ", %0\n\t" 61 - "and %0, %1, %0" 62 - : "=&r" (flags) 63 - : "r" (__dummy)); 64 - 65 - return flags; 66 - } 67 - 68 - static inline unsigned long __raw_local_irq_save(void) 69 - { 70 - unsigned long long __dummy0, __dummy1 = SR_MASK_LL; 71 - unsigned long flags; 72 - 73 - __asm__ __volatile__ ( 74 - "getcon " __SR ", %1\n\t" 75 - "or %1, r63, %0\n\t" 76 - "or %1, %2, %1\n\t" 77 - "putcon %1, " __SR "\n\t" 78 - "and %0, %2, %0" 79 - : "=&r" (flags), "=&r" (__dummy0) 80 - : "r" (__dummy1)); 81 - 82 - return flags; 83 - } 84 - 85 - #endif /* __ASM_SH_IRQFLAGS_64_H */
include/asm-sh/kdebug.h arch/sh/include/asm/kdebug.h
include/asm-sh/kexec.h arch/sh/include/asm/kexec.h
include/asm-sh/kgdb.h arch/sh/include/asm/kgdb.h
include/asm-sh/kmap_types.h arch/sh/include/asm/kmap_types.h
include/asm-sh/landisk/gio.h arch/sh/include/mach-landisk/mach/gio.h
include/asm-sh/landisk/iodata_landisk.h arch/sh/include/mach-landisk/mach/iodata_landisk.h
include/asm-sh/lboxre2.h arch/sh/include/asm/lboxre2.h
include/asm-sh/linkage.h arch/sh/include/asm/linkage.h
include/asm-sh/local.h arch/sh/include/asm/local.h
include/asm-sh/machvec.h arch/sh/include/asm/machvec.h
include/asm-sh/magicpanelr2.h arch/sh/include/asm/magicpanelr2.h
include/asm-sh/mc146818rtc.h arch/sh/include/asm/mc146818rtc.h
include/asm-sh/microdev.h arch/sh/include/asm/microdev.h
include/asm-sh/migor.h arch/sh/include/asm/migor.h
include/asm-sh/mman.h arch/sh/include/asm/mman.h
include/asm-sh/mmu.h arch/sh/include/asm/mmu.h
-185
include/asm-sh/mmu_context.h
··· 1 - /* 2 - * Copyright (C) 1999 Niibe Yutaka 3 - * Copyright (C) 2003 - 2007 Paul Mundt 4 - * 5 - * ASID handling idea taken from MIPS implementation. 6 - */ 7 - #ifndef __ASM_SH_MMU_CONTEXT_H 8 - #define __ASM_SH_MMU_CONTEXT_H 9 - 10 - #ifdef __KERNEL__ 11 - #include <asm/cpu/mmu_context.h> 12 - #include <asm/tlbflush.h> 13 - #include <asm/uaccess.h> 14 - #include <asm/io.h> 15 - #include <asm-generic/mm_hooks.h> 16 - 17 - /* 18 - * The MMU "context" consists of two things: 19 - * (a) TLB cache version (or round, cycle whatever expression you like) 20 - * (b) ASID (Address Space IDentifier) 21 - */ 22 - #define MMU_CONTEXT_ASID_MASK 0x000000ff 23 - #define MMU_CONTEXT_VERSION_MASK 0xffffff00 24 - #define MMU_CONTEXT_FIRST_VERSION 0x00000100 25 - #define NO_CONTEXT 0 26 - 27 - /* ASID is 8-bit value, so it can't be 0x100 */ 28 - #define MMU_NO_ASID 0x100 29 - 30 - #define asid_cache(cpu) (cpu_data[cpu].asid_cache) 31 - 32 - #ifdef CONFIG_MMU 33 - #define cpu_context(cpu, mm) ((mm)->context.id[cpu]) 34 - 35 - #define cpu_asid(cpu, mm) \ 36 - (cpu_context((cpu), (mm)) & MMU_CONTEXT_ASID_MASK) 37 - 38 - /* 39 - * Virtual Page Number mask 40 - */ 41 - #define MMU_VPN_MASK 0xfffff000 42 - 43 - #if defined(CONFIG_SUPERH32) 44 - #include "mmu_context_32.h" 45 - #else 46 - #include "mmu_context_64.h" 47 - #endif 48 - 49 - /* 50 - * Get MMU context if needed. 51 - */ 52 - static inline void get_mmu_context(struct mm_struct *mm, unsigned int cpu) 53 - { 54 - unsigned long asid = asid_cache(cpu); 55 - 56 - /* Check if we have old version of context. */ 57 - if (((cpu_context(cpu, mm) ^ asid) & MMU_CONTEXT_VERSION_MASK) == 0) 58 - /* It's up to date, do nothing */ 59 - return; 60 - 61 - /* It's old, we need to get new context with new version. */ 62 - if (!(++asid & MMU_CONTEXT_ASID_MASK)) { 63 - /* 64 - * We exhaust ASID of this version. 65 - * Flush all TLB and start new cycle. 66 - */ 67 - flush_tlb_all(); 68 - 69 - #ifdef CONFIG_SUPERH64 70 - /* 71 - * The SH-5 cache uses the ASIDs, requiring both the I and D 72 - * cache to be flushed when the ASID is exhausted. Weak. 73 - */ 74 - flush_cache_all(); 75 - #endif 76 - 77 - /* 78 - * Fix version; Note that we avoid version #0 79 - * to distingush NO_CONTEXT. 80 - */ 81 - if (!asid) 82 - asid = MMU_CONTEXT_FIRST_VERSION; 83 - } 84 - 85 - cpu_context(cpu, mm) = asid_cache(cpu) = asid; 86 - } 87 - 88 - /* 89 - * Initialize the context related info for a new mm_struct 90 - * instance. 91 - */ 92 - static inline int init_new_context(struct task_struct *tsk, 93 - struct mm_struct *mm) 94 - { 95 - int i; 96 - 97 - for (i = 0; i < num_online_cpus(); i++) 98 - cpu_context(i, mm) = NO_CONTEXT; 99 - 100 - return 0; 101 - } 102 - 103 - /* 104 - * After we have set current->mm to a new value, this activates 105 - * the context for the new mm so we see the new mappings. 106 - */ 107 - static inline void activate_context(struct mm_struct *mm, unsigned int cpu) 108 - { 109 - get_mmu_context(mm, cpu); 110 - set_asid(cpu_asid(cpu, mm)); 111 - } 112 - 113 - static inline void switch_mm(struct mm_struct *prev, 114 - struct mm_struct *next, 115 - struct task_struct *tsk) 116 - { 117 - unsigned int cpu = smp_processor_id(); 118 - 119 - if (likely(prev != next)) { 120 - cpu_set(cpu, next->cpu_vm_mask); 121 - set_TTB(next->pgd); 122 - activate_context(next, cpu); 123 - } else 124 - if (!cpu_test_and_set(cpu, next->cpu_vm_mask)) 125 - activate_context(next, cpu); 126 - } 127 - #else 128 - #define get_mmu_context(mm) do { } while (0) 129 - #define init_new_context(tsk,mm) (0) 130 - #define destroy_context(mm) do { } while (0) 131 - #define set_asid(asid) do { } while (0) 132 - #define get_asid() (0) 133 - #define cpu_asid(cpu, mm) ({ (void)cpu; 0; }) 134 - #define switch_and_save_asid(asid) (0) 135 - #define set_TTB(pgd) do { } while (0) 136 - #define get_TTB() (0) 137 - #define activate_context(mm,cpu) do { } while (0) 138 - #define switch_mm(prev,next,tsk) do { } while (0) 139 - #endif /* CONFIG_MMU */ 140 - 141 - #define activate_mm(prev, next) switch_mm((prev),(next),NULL) 142 - #define deactivate_mm(tsk,mm) do { } while (0) 143 - #define enter_lazy_tlb(mm,tsk) do { } while (0) 144 - 145 - #if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4) 146 - /* 147 - * If this processor has an MMU, we need methods to turn it off/on .. 148 - * paging_init() will also have to be updated for the processor in 149 - * question. 150 - */ 151 - static inline void enable_mmu(void) 152 - { 153 - unsigned int cpu = smp_processor_id(); 154 - 155 - /* Enable MMU */ 156 - ctrl_outl(MMU_CONTROL_INIT, MMUCR); 157 - ctrl_barrier(); 158 - 159 - if (asid_cache(cpu) == NO_CONTEXT) 160 - asid_cache(cpu) = MMU_CONTEXT_FIRST_VERSION; 161 - 162 - set_asid(asid_cache(cpu) & MMU_CONTEXT_ASID_MASK); 163 - } 164 - 165 - static inline void disable_mmu(void) 166 - { 167 - unsigned long cr; 168 - 169 - cr = ctrl_inl(MMUCR); 170 - cr &= ~MMU_CONTROL_INIT; 171 - ctrl_outl(cr, MMUCR); 172 - 173 - ctrl_barrier(); 174 - } 175 - #else 176 - /* 177 - * MMU control handlers for processors lacking memory 178 - * management hardware. 179 - */ 180 - #define enable_mmu() do { } while (0) 181 - #define disable_mmu() do { } while (0) 182 - #endif 183 - 184 - #endif /* __KERNEL__ */ 185 - #endif /* __ASM_SH_MMU_CONTEXT_H */
include/asm-sh/mmu_context_32.h arch/sh/include/asm/mmu_context_32.h
-78
include/asm-sh/mmu_context_64.h
··· 1 - #ifndef __ASM_SH_MMU_CONTEXT_64_H 2 - #define __ASM_SH_MMU_CONTEXT_64_H 3 - 4 - /* 5 - * sh64-specific mmu_context interface. 6 - * 7 - * Copyright (C) 2000, 2001 Paolo Alberelli 8 - * Copyright (C) 2003 - 2007 Paul Mundt 9 - * 10 - * This file is subject to the terms and conditions of the GNU General Public 11 - * License. See the file "COPYING" in the main directory of this archive 12 - * for more details. 13 - */ 14 - #include <asm/cpu/registers.h> 15 - #include <asm/cacheflush.h> 16 - 17 - #define SR_ASID_MASK 0xffffffffff00ffffULL 18 - #define SR_ASID_SHIFT 16 19 - 20 - /* 21 - * Destroy context related info for an mm_struct that is about 22 - * to be put to rest. 23 - */ 24 - static inline void destroy_context(struct mm_struct *mm) 25 - { 26 - /* Well, at least free TLB entries */ 27 - flush_tlb_mm(mm); 28 - } 29 - 30 - static inline unsigned long get_asid(void) 31 - { 32 - unsigned long long sr; 33 - 34 - asm volatile ("getcon " __SR ", %0\n\t" 35 - : "=r" (sr)); 36 - 37 - sr = (sr >> SR_ASID_SHIFT) & MMU_CONTEXT_ASID_MASK; 38 - return (unsigned long) sr; 39 - } 40 - 41 - /* Set ASID into SR */ 42 - static inline void set_asid(unsigned long asid) 43 - { 44 - unsigned long long sr, pc; 45 - 46 - asm volatile ("getcon " __SR ", %0" : "=r" (sr)); 47 - 48 - sr = (sr & SR_ASID_MASK) | (asid << SR_ASID_SHIFT); 49 - 50 - /* 51 - * It is possible that this function may be inlined and so to avoid 52 - * the assembler reporting duplicate symbols we make use of the 53 - * gas trick of generating symbols using numerics and forward 54 - * reference. 55 - */ 56 - asm volatile ("movi 1, %1\n\t" 57 - "shlli %1, 28, %1\n\t" 58 - "or %0, %1, %1\n\t" 59 - "putcon %1, " __SR "\n\t" 60 - "putcon %0, " __SSR "\n\t" 61 - "movi 1f, %1\n\t" 62 - "ori %1, 1 , %1\n\t" 63 - "putcon %1, " __SPC "\n\t" 64 - "rte\n" 65 - "1:\n\t" 66 - : "=r" (sr), "=r" (pc) : "0" (sr)); 67 - } 68 - 69 - /* arch/sh/kernel/cpu/sh5/entry.S */ 70 - extern unsigned long switch_and_save_asid(unsigned long new_asid); 71 - 72 - /* No spare register to twiddle, so use a software cache */ 73 - extern pgd_t *mmu_pdtp_cache; 74 - 75 - #define set_TTB(pgd) (mmu_pdtp_cache = (pgd)) 76 - #define get_TTB() (mmu_pdtp_cache) 77 - 78 - #endif /* __ASM_SH_MMU_CONTEXT_64_H */
include/asm-sh/mmzone.h arch/sh/include/asm/mmzone.h
include/asm-sh/module.h arch/sh/include/asm/module.h
include/asm-sh/msgbuf.h arch/sh/include/asm/msgbuf.h
include/asm-sh/mutex.h arch/sh/include/asm/mutex.h
include/asm-sh/page.h arch/sh/include/asm/page.h
include/asm-sh/param.h arch/sh/include/asm/param.h
include/asm-sh/parport.h arch/sh/include/asm/parport.h
include/asm-sh/pci.h arch/sh/include/asm/pci.h
include/asm-sh/percpu.h arch/sh/include/asm/percpu.h
include/asm-sh/pgalloc.h arch/sh/include/asm/pgalloc.h
include/asm-sh/pgtable.h arch/sh/include/asm/pgtable.h
include/asm-sh/pgtable_32.h arch/sh/include/asm/pgtable_32.h
include/asm-sh/pgtable_64.h arch/sh/include/asm/pgtable_64.h
include/asm-sh/pm.h arch/sh/include/asm/pm.h
include/asm-sh/poll.h arch/sh/include/asm/poll.h
include/asm-sh/posix_types.h arch/sh/include/asm/posix_types.h
include/asm-sh/posix_types_32.h arch/sh/include/asm/posix_types_32.h
include/asm-sh/posix_types_64.h arch/sh/include/asm/posix_types_64.h
include/asm-sh/processor.h arch/sh/include/asm/processor.h
include/asm-sh/processor_32.h arch/sh/include/asm/processor_32.h
-275
include/asm-sh/processor_64.h
··· 1 - #ifndef __ASM_SH_PROCESSOR_64_H 2 - #define __ASM_SH_PROCESSOR_64_H 3 - 4 - /* 5 - * include/asm-sh/processor_64.h 6 - * 7 - * Copyright (C) 2000, 2001 Paolo Alberelli 8 - * Copyright (C) 2003 Paul Mundt 9 - * Copyright (C) 2004 Richard Curnow 10 - * 11 - * This file is subject to the terms and conditions of the GNU General Public 12 - * License. See the file "COPYING" in the main directory of this archive 13 - * for more details. 14 - */ 15 - #ifndef __ASSEMBLY__ 16 - 17 - #include <linux/compiler.h> 18 - #include <asm/page.h> 19 - #include <asm/types.h> 20 - #include <asm/cache.h> 21 - #include <asm/ptrace.h> 22 - #include <asm/cpu/registers.h> 23 - 24 - /* 25 - * Default implementation of macro that returns current 26 - * instruction pointer ("program counter"). 27 - */ 28 - #define current_text_addr() ({ \ 29 - void *pc; \ 30 - unsigned long long __dummy = 0; \ 31 - __asm__("gettr tr0, %1\n\t" \ 32 - "pta 4, tr0\n\t" \ 33 - "gettr tr0, %0\n\t" \ 34 - "ptabs %1, tr0\n\t" \ 35 - :"=r" (pc), "=r" (__dummy) \ 36 - : "1" (__dummy)); \ 37 - pc; }) 38 - 39 - /* 40 - * TLB information structure 41 - * 42 - * Defined for both I and D tlb, per-processor. 43 - */ 44 - struct tlb_info { 45 - unsigned long long next; 46 - unsigned long long first; 47 - unsigned long long last; 48 - 49 - unsigned int entries; 50 - unsigned int step; 51 - 52 - unsigned long flags; 53 - }; 54 - 55 - struct sh_cpuinfo { 56 - enum cpu_type type; 57 - unsigned long loops_per_jiffy; 58 - unsigned long asid_cache; 59 - 60 - unsigned int cpu_clock, master_clock, bus_clock, module_clock; 61 - 62 - /* Cache info */ 63 - struct cache_info icache; 64 - struct cache_info dcache; 65 - struct cache_info scache; 66 - 67 - /* TLB info */ 68 - struct tlb_info itlb; 69 - struct tlb_info dtlb; 70 - 71 - unsigned long flags; 72 - }; 73 - 74 - extern struct sh_cpuinfo cpu_data[]; 75 - #define boot_cpu_data cpu_data[0] 76 - #define current_cpu_data cpu_data[smp_processor_id()] 77 - #define raw_current_cpu_data cpu_data[raw_smp_processor_id()] 78 - 79 - #endif 80 - 81 - /* 82 - * User space process size: 2GB - 4k. 83 - */ 84 - #define TASK_SIZE 0x7ffff000UL 85 - 86 - #define STACK_TOP TASK_SIZE 87 - #define STACK_TOP_MAX STACK_TOP 88 - 89 - /* This decides where the kernel will search for a free chunk of vm 90 - * space during mmap's. 91 - */ 92 - #define TASK_UNMAPPED_BASE (TASK_SIZE / 3) 93 - 94 - /* 95 - * Bit of SR register 96 - * 97 - * FD-bit: 98 - * When it's set, it means the processor doesn't have right to use FPU, 99 - * and it results exception when the floating operation is executed. 100 - * 101 - * IMASK-bit: 102 - * Interrupt level mask 103 - * 104 - * STEP-bit: 105 - * Single step bit 106 - * 107 - */ 108 - #if defined(CONFIG_SH64_SR_WATCH) 109 - #define SR_MMU 0x84000000 110 - #else 111 - #define SR_MMU 0x80000000 112 - #endif 113 - 114 - #define SR_IMASK 0x000000f0 115 - #define SR_FD 0x00008000 116 - #define SR_SSTEP 0x08000000 117 - 118 - #ifndef __ASSEMBLY__ 119 - 120 - /* 121 - * FPU structure and data : require 8-byte alignment as we need to access it 122 - with fld.p, fst.p 123 - */ 124 - 125 - struct sh_fpu_hard_struct { 126 - unsigned long fp_regs[64]; 127 - unsigned int fpscr; 128 - /* long status; * software status information */ 129 - }; 130 - 131 - #if 0 132 - /* Dummy fpu emulator */ 133 - struct sh_fpu_soft_struct { 134 - unsigned long long fp_regs[32]; 135 - unsigned int fpscr; 136 - unsigned char lookahead; 137 - unsigned long entry_pc; 138 - }; 139 - #endif 140 - 141 - union sh_fpu_union { 142 - struct sh_fpu_hard_struct hard; 143 - /* 'hard' itself only produces 32 bit alignment, yet we need 144 - to access it using 64 bit load/store as well. */ 145 - unsigned long long alignment_dummy; 146 - }; 147 - 148 - struct thread_struct { 149 - unsigned long sp; 150 - unsigned long pc; 151 - /* This stores the address of the pt_regs built during a context 152 - switch, or of the register save area built for a kernel mode 153 - exception. It is used for backtracing the stack of a sleeping task 154 - or one that traps in kernel mode. */ 155 - struct pt_regs *kregs; 156 - /* This stores the address of the pt_regs constructed on entry from 157 - user mode. It is a fixed value over the lifetime of a process, or 158 - NULL for a kernel thread. */ 159 - struct pt_regs *uregs; 160 - 161 - unsigned long trap_no, error_code; 162 - unsigned long address; 163 - /* Hardware debugging registers may come here */ 164 - 165 - /* floating point info */ 166 - union sh_fpu_union fpu; 167 - }; 168 - 169 - #define INIT_MMAP \ 170 - { &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL } 171 - 172 - extern struct pt_regs fake_swapper_regs; 173 - 174 - #define INIT_THREAD { \ 175 - .sp = sizeof(init_stack) + \ 176 - (long) &init_stack, \ 177 - .pc = 0, \ 178 - .kregs = &fake_swapper_regs, \ 179 - .uregs = NULL, \ 180 - .trap_no = 0, \ 181 - .error_code = 0, \ 182 - .address = 0, \ 183 - .fpu = { { { 0, } }, } \ 184 - } 185 - 186 - /* 187 - * Do necessary setup to start up a newly executed thread. 188 - */ 189 - #define SR_USER (SR_MMU | SR_FD) 190 - 191 - #define start_thread(regs, new_pc, new_sp) \ 192 - set_fs(USER_DS); \ 193 - regs->sr = SR_USER; /* User mode. */ \ 194 - regs->pc = new_pc - 4; /* Compensate syscall exit */ \ 195 - regs->pc |= 1; /* Set SHmedia ! */ \ 196 - regs->regs[18] = 0; \ 197 - regs->regs[15] = new_sp 198 - 199 - /* Forward declaration, a strange C thing */ 200 - struct task_struct; 201 - struct mm_struct; 202 - 203 - /* Free all resources held by a thread. */ 204 - extern void release_thread(struct task_struct *); 205 - /* 206 - * create a kernel thread without removing it from tasklists 207 - */ 208 - extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); 209 - 210 - 211 - /* Copy and release all segment info associated with a VM */ 212 - #define copy_segments(p, mm) do { } while (0) 213 - #define release_segments(mm) do { } while (0) 214 - #define forget_segments() do { } while (0) 215 - #define prepare_to_copy(tsk) do { } while (0) 216 - /* 217 - * FPU lazy state save handling. 218 - */ 219 - 220 - static inline void disable_fpu(void) 221 - { 222 - unsigned long long __dummy; 223 - 224 - /* Set FD flag in SR */ 225 - __asm__ __volatile__("getcon " __SR ", %0\n\t" 226 - "or %0, %1, %0\n\t" 227 - "putcon %0, " __SR "\n\t" 228 - : "=&r" (__dummy) 229 - : "r" (SR_FD)); 230 - } 231 - 232 - static inline void enable_fpu(void) 233 - { 234 - unsigned long long __dummy; 235 - 236 - /* Clear out FD flag in SR */ 237 - __asm__ __volatile__("getcon " __SR ", %0\n\t" 238 - "and %0, %1, %0\n\t" 239 - "putcon %0, " __SR "\n\t" 240 - : "=&r" (__dummy) 241 - : "r" (~SR_FD)); 242 - } 243 - 244 - /* Round to nearest, no exceptions on inexact, overflow, underflow, 245 - zero-divide, invalid. Configure option for whether to flush denorms to 246 - zero, or except if a denorm is encountered. */ 247 - #if defined(CONFIG_SH64_FPU_DENORM_FLUSH) 248 - #define FPSCR_INIT 0x00040000 249 - #else 250 - #define FPSCR_INIT 0x00000000 251 - #endif 252 - 253 - #ifdef CONFIG_SH_FPU 254 - /* Initialise the FP state of a task */ 255 - void fpinit(struct sh_fpu_hard_struct *fpregs); 256 - #else 257 - #define fpinit(fpregs) do { } while (0) 258 - #endif 259 - 260 - extern struct task_struct *last_task_used_math; 261 - 262 - /* 263 - * Return saved PC of a blocked thread. 264 - */ 265 - #define thread_saved_pc(tsk) (tsk->thread.pc) 266 - 267 - extern unsigned long get_wchan(struct task_struct *p); 268 - 269 - #define KSTK_EIP(tsk) ((tsk)->thread.pc) 270 - #define KSTK_ESP(tsk) ((tsk)->thread.sp) 271 - 272 - #define cpu_relax() barrier() 273 - 274 - #endif /* __ASSEMBLY__ */ 275 - #endif /* __ASM_SH_PROCESSOR_64_H */
include/asm-sh/ptrace.h arch/sh/include/asm/ptrace.h
include/asm-sh/push-switch.h arch/sh/include/asm/push-switch.h
include/asm-sh/r7780rp.h arch/sh/include/asm/r7780rp.h
include/asm-sh/resource.h arch/sh/include/asm/resource.h
-16
include/asm-sh/rtc.h
··· 1 - #ifndef _ASM_RTC_H 2 - #define _ASM_RTC_H 3 - 4 - extern void (*board_time_init)(void); 5 - extern void (*rtc_sh_get_time)(struct timespec *); 6 - extern int (*rtc_sh_set_time)(const time_t); 7 - 8 - #define RTC_CAP_4_DIGIT_YEAR (1 << 0) 9 - 10 - struct sh_rtc_platform_info { 11 - unsigned long capabilities; 12 - }; 13 - 14 - #include <asm/cpu/rtc.h> 15 - 16 - #endif /* _ASM_RTC_H */
include/asm-sh/rts7751r2d.h arch/sh/include/asm/rts7751r2d.h
include/asm-sh/rwsem.h arch/sh/include/asm/rwsem.h
include/asm-sh/scatterlist.h arch/sh/include/asm/scatterlist.h
include/asm-sh/sdk7780.h arch/sh/include/asm/sdk7780.h
include/asm-sh/se.h arch/sh/include/asm/se.h
include/asm-sh/se7206.h arch/sh/include/asm/se7206.h
include/asm-sh/se7343.h arch/sh/include/asm/se7343.h
include/asm-sh/se7721.h arch/sh/include/asm/se7721.h
include/asm-sh/se7722.h arch/sh/include/asm/se7722.h
include/asm-sh/se7751.h arch/sh/include/asm/se7751.h
include/asm-sh/se7780.h arch/sh/include/asm/se7780.h
include/asm-sh/sections.h arch/sh/include/asm/sections.h
include/asm-sh/segment.h arch/sh/include/asm/segment.h
include/asm-sh/sembuf.h arch/sh/include/asm/sembuf.h
-36
include/asm-sh/serial.h
··· 1 - /* 2 - * include/asm-sh/serial.h 3 - * 4 - * Configuration details for 8250, 16450, 16550, etc. serial ports 5 - */ 6 - 7 - #ifndef _ASM_SERIAL_H 8 - #define _ASM_SERIAL_H 9 - 10 - #include <linux/kernel.h> 11 - 12 - /* 13 - * This assumes you have a 1.8432 MHz clock for your UART. 14 - * 15 - * It'd be nice if someone built a serial card with a 24.576 MHz 16 - * clock, since the 16550A is capable of handling a top speed of 1.5 17 - * megabits/second; but this requires the faster clock. 18 - */ 19 - #define BASE_BAUD ( 1843200 / 16 ) 20 - 21 - #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) 22 - 23 - #ifdef CONFIG_HD64465 24 - #include <asm/hd64465.h> 25 - 26 - #define SERIAL_PORT_DFNS \ 27 - /* UART CLK PORT IRQ FLAGS */ \ 28 - { 0, BASE_BAUD, 0x3F8, HD64465_IRQ_UART, STD_COM_FLAGS } /* ttyS0 */ 29 - 30 - #else 31 - 32 - #define SERIAL_PORT_DFNS 33 - 34 - #endif 35 - 36 - #endif /* _ASM_SERIAL_H */
include/asm-sh/setup.h arch/sh/include/asm/setup.h
include/asm-sh/sfp-machine.h arch/sh/include/asm/sfp-machine.h
include/asm-sh/sh03/io.h arch/sh/include/mach-sh03/mach/io.h
include/asm-sh/sh03/sh03.h arch/sh/include/mach-sh03/mach/sh03.h
include/asm-sh/sh7760fb.h arch/sh/include/asm/sh7760fb.h
include/asm-sh/sh7763rdp.h arch/sh/include/asm/sh7763rdp.h
include/asm-sh/sh7785lcr.h arch/sh/include/asm/sh7785lcr.h
include/asm-sh/sh_bios.h arch/sh/include/asm/sh_bios.h
include/asm-sh/sh_keysc.h arch/sh/include/asm/sh_keysc.h
include/asm-sh/sh_mobile_lcdc.h arch/sh/include/asm/sh_mobile_lcdc.h
include/asm-sh/shmbuf.h arch/sh/include/asm/shmbuf.h
include/asm-sh/shmin.h arch/sh/include/asm/shmin.h
include/asm-sh/shmparam.h arch/sh/include/asm/shmparam.h
include/asm-sh/sigcontext.h arch/sh/include/asm/sigcontext.h
include/asm-sh/siginfo.h arch/sh/include/asm/siginfo.h
include/asm-sh/signal.h arch/sh/include/asm/signal.h
include/asm-sh/smc37c93x.h arch/sh/include/asm/smc37c93x.h
include/asm-sh/smp.h arch/sh/include/asm/smp.h
include/asm-sh/snapgear.h arch/sh/include/asm/snapgear.h
include/asm-sh/socket.h arch/sh/include/asm/socket.h
include/asm-sh/sockios.h arch/sh/include/asm/sockios.h
include/asm-sh/sparsemem.h arch/sh/include/asm/sparsemem.h
include/asm-sh/spi.h arch/sh/include/asm/spi.h
include/asm-sh/spinlock.h arch/sh/include/asm/spinlock.h
include/asm-sh/spinlock_types.h arch/sh/include/asm/spinlock_types.h
include/asm-sh/stat.h arch/sh/include/asm/stat.h
include/asm-sh/statfs.h arch/sh/include/asm/statfs.h
include/asm-sh/string.h arch/sh/include/asm/string.h
include/asm-sh/string_32.h arch/sh/include/asm/string_32.h
include/asm-sh/string_64.h arch/sh/include/asm/string_64.h
include/asm-sh/system.h arch/sh/include/asm/system.h
include/asm-sh/system_32.h arch/sh/include/asm/system_32.h
include/asm-sh/system_64.h arch/sh/include/asm/system_64.h
include/asm-sh/systemh7751.h arch/sh/include/asm/systemh7751.h
include/asm-sh/termbits.h arch/sh/include/asm/termbits.h
include/asm-sh/termios.h arch/sh/include/asm/termios.h
include/asm-sh/thread_info.h arch/sh/include/asm/thread_info.h
-44
include/asm-sh/timer.h
··· 1 - #ifndef __ASM_SH_TIMER_H 2 - #define __ASM_SH_TIMER_H 3 - 4 - #include <linux/sysdev.h> 5 - #include <linux/clocksource.h> 6 - #include <asm/cpu/timer.h> 7 - 8 - struct sys_timer_ops { 9 - int (*init)(void); 10 - int (*start)(void); 11 - int (*stop)(void); 12 - cycle_t (*read)(void); 13 - #ifndef CONFIG_GENERIC_TIME 14 - unsigned long (*get_offset)(void); 15 - #endif 16 - }; 17 - 18 - struct sys_timer { 19 - const char *name; 20 - 21 - struct sys_device dev; 22 - struct sys_timer_ops *ops; 23 - }; 24 - 25 - #define TICK_SIZE (tick_nsec / 1000) 26 - 27 - extern struct sys_timer tmu_timer, cmt_timer, mtu2_timer; 28 - extern struct sys_timer *sys_timer; 29 - 30 - #ifndef CONFIG_GENERIC_TIME 31 - static inline unsigned long get_timer_offset(void) 32 - { 33 - return sys_timer->ops->get_offset(); 34 - } 35 - #endif 36 - 37 - /* arch/sh/kernel/timers/timer.c */ 38 - struct sys_timer *get_sys_timer(void); 39 - 40 - /* arch/sh/kernel/time.c */ 41 - void handle_timer_tick(void); 42 - extern unsigned long sh_hpt_frequency; 43 - 44 - #endif /* __ASM_SH_TIMER_H */
include/asm-sh/timex.h arch/sh/include/asm/timex.h
include/asm-sh/titan.h arch/sh/include/asm/titan.h
include/asm-sh/tlb.h arch/sh/include/asm/tlb.h
include/asm-sh/tlb_64.h arch/sh/include/asm/tlb_64.h
include/asm-sh/tlbflush.h arch/sh/include/asm/tlbflush.h
include/asm-sh/topology.h arch/sh/include/asm/topology.h
include/asm-sh/types.h arch/sh/include/asm/types.h
include/asm-sh/uaccess.h arch/sh/include/asm/uaccess.h
include/asm-sh/uaccess_32.h arch/sh/include/asm/uaccess_32.h
include/asm-sh/uaccess_64.h arch/sh/include/asm/uaccess_64.h
-64
include/asm-sh/ubc.h
··· 1 - /* 2 - * include/asm-sh/ubc.h 3 - * 4 - * Copyright (C) 1999 Niibe Yutaka 5 - * Copyright (C) 2002, 2003 Paul Mundt 6 - * 7 - * This file is subject to the terms and conditions of the GNU General Public 8 - * License. See the file "COPYING" in the main directory of this archive 9 - * for more details. 10 - */ 11 - #ifndef __ASM_SH_UBC_H 12 - #define __ASM_SH_UBC_H 13 - #ifdef __KERNEL__ 14 - 15 - #include <asm/cpu/ubc.h> 16 - 17 - /* User Break Controller */ 18 - #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) 19 - #define UBC_TYPE_SH7729 (current_cpu_data.type == CPU_SH7729) 20 - #else 21 - #define UBC_TYPE_SH7729 0 22 - #endif 23 - 24 - #define BAMR_ASID (1 << 2) 25 - #define BAMR_NONE 0 26 - #define BAMR_10 0x1 27 - #define BAMR_12 0x2 28 - #define BAMR_ALL 0x3 29 - #define BAMR_16 0x8 30 - #define BAMR_20 0x9 31 - 32 - #define BBR_INST (1 << 4) 33 - #define BBR_DATA (2 << 4) 34 - #define BBR_READ (1 << 2) 35 - #define BBR_WRITE (2 << 2) 36 - #define BBR_BYTE 0x1 37 - #define BBR_HALF 0x2 38 - #define BBR_LONG 0x3 39 - #define BBR_QUAD (1 << 6) /* SH7750 */ 40 - #define BBR_CPU (1 << 6) /* SH7709A,SH7729 */ 41 - #define BBR_DMA (2 << 6) /* SH7709A,SH7729 */ 42 - 43 - #define BRCR_CMFA (1 << 15) 44 - #define BRCR_CMFB (1 << 14) 45 - #define BRCR_PCTE (1 << 11) 46 - #define BRCR_PCBA (1 << 10) /* 1: after execution */ 47 - #define BRCR_DBEB (1 << 7) 48 - #define BRCR_PCBB (1 << 6) 49 - #define BRCR_SEQ (1 << 3) 50 - #define BRCR_UBDE (1 << 0) 51 - 52 - #ifndef __ASSEMBLY__ 53 - /* arch/sh/kernel/cpu/ubc.S */ 54 - extern void ubc_sleep(void); 55 - 56 - #ifdef CONFIG_UBC_WAKEUP 57 - extern void ubc_wakeup(void); 58 - #else 59 - #define ubc_wakeup() do { } while (0) 60 - #endif 61 - #endif 62 - 63 - #endif /* __KERNEL__ */ 64 - #endif /* __ASM_SH_UBC_H */
include/asm-sh/ucontext.h arch/sh/include/asm/ucontext.h
include/asm-sh/unaligned.h arch/sh/include/asm/unaligned.h
include/asm-sh/unistd.h arch/sh/include/asm/unistd.h
include/asm-sh/unistd_32.h arch/sh/include/asm/unistd_32.h
include/asm-sh/unistd_64.h arch/sh/include/asm/unistd_64.h
include/asm-sh/user.h arch/sh/include/asm/user.h
include/asm-sh/vga.h arch/sh/include/asm/vga.h
-107
include/asm-sh/watchdog.h
··· 1 - /* 2 - * include/asm-sh/watchdog.h 3 - * 4 - * Copyright (C) 2002, 2003 Paul Mundt 5 - * 6 - * This program is free software; you can redistribute it and/or modify it 7 - * under the terms of the GNU General Public License as published by the 8 - * Free Software Foundation; either version 2 of the License, or (at your 9 - * option) any later version. 10 - */ 11 - #ifndef __ASM_SH_WATCHDOG_H 12 - #define __ASM_SH_WATCHDOG_H 13 - #ifdef __KERNEL__ 14 - 15 - #include <linux/types.h> 16 - #include <asm/cpu/watchdog.h> 17 - #include <asm/io.h> 18 - 19 - /* 20 - * See asm/cpu-sh2/watchdog.h for explanation of this stupidity.. 21 - */ 22 - #ifndef WTCNT_R 23 - # define WTCNT_R WTCNT 24 - #endif 25 - 26 - #ifndef WTCSR_R 27 - # define WTCSR_R WTCSR 28 - #endif 29 - 30 - #define WTCNT_HIGH 0x5a 31 - #define WTCSR_HIGH 0xa5 32 - 33 - #define WTCSR_CKS2 0x04 34 - #define WTCSR_CKS1 0x02 35 - #define WTCSR_CKS0 0x01 36 - 37 - /* 38 - * CKS0-2 supports a number of clock division ratios. At the time the watchdog 39 - * is enabled, it defaults to a 41 usec overflow period .. we overload this to 40 - * something a little more reasonable, and really can't deal with anything 41 - * lower than WTCSR_CKS_1024, else we drop back into the usec range. 42 - * 43 - * Clock Division Ratio Overflow Period 44 - * -------------------------------------------- 45 - * 1/32 (initial value) 41 usecs 46 - * 1/64 82 usecs 47 - * 1/128 164 usecs 48 - * 1/256 328 usecs 49 - * 1/512 656 usecs 50 - * 1/1024 1.31 msecs 51 - * 1/2048 2.62 msecs 52 - * 1/4096 5.25 msecs 53 - */ 54 - #define WTCSR_CKS_32 0x00 55 - #define WTCSR_CKS_64 0x01 56 - #define WTCSR_CKS_128 0x02 57 - #define WTCSR_CKS_256 0x03 58 - #define WTCSR_CKS_512 0x04 59 - #define WTCSR_CKS_1024 0x05 60 - #define WTCSR_CKS_2048 0x06 61 - #define WTCSR_CKS_4096 0x07 62 - 63 - /** 64 - * sh_wdt_read_cnt - Read from Counter 65 - * Reads back the WTCNT value. 66 - */ 67 - static inline __u8 sh_wdt_read_cnt(void) 68 - { 69 - return ctrl_inb(WTCNT_R); 70 - } 71 - 72 - /** 73 - * sh_wdt_write_cnt - Write to Counter 74 - * @val: Value to write 75 - * 76 - * Writes the given value @val to the lower byte of the timer counter. 77 - * The upper byte is set manually on each write. 78 - */ 79 - static inline void sh_wdt_write_cnt(__u8 val) 80 - { 81 - ctrl_outw((WTCNT_HIGH << 8) | (__u16)val, WTCNT); 82 - } 83 - 84 - /** 85 - * sh_wdt_read_csr - Read from Control/Status Register 86 - * 87 - * Reads back the WTCSR value. 88 - */ 89 - static inline __u8 sh_wdt_read_csr(void) 90 - { 91 - return ctrl_inb(WTCSR_R); 92 - } 93 - 94 - /** 95 - * sh_wdt_write_csr - Write to Control/Status Register 96 - * @val: Value to write 97 - * 98 - * Writes the given value @val to the lower byte of the control/status 99 - * register. The upper byte is set manually on each write. 100 - */ 101 - static inline void sh_wdt_write_csr(__u8 val) 102 - { 103 - ctrl_outw((WTCSR_HIGH << 8) | (__u16)val, WTCSR); 104 - } 105 - 106 - #endif /* __KERNEL__ */ 107 - #endif /* __ASM_SH_WATCHDOG_H */
include/asm-sh/xor.h arch/sh/include/asm/xor.h
+1 -1
sound/sh/aica.c
··· 42 42 #include <sound/info.h> 43 43 #include <asm/io.h> 44 44 #include <asm/dma.h> 45 - #include <asm/dreamcast/sysasic.h> 45 + #include <mach/sysasic.h> 46 46 #include "aica.h" 47 47 48 48 MODULE_AUTHOR("Adrian McMenamin <adrian@mcmen.demon.co.uk>");