Commit f15cbe6f authored by Paul Mundt's avatar Paul Mundt

sh: migrate to arch/sh/include/

This follows the sparc changes a439fe51.

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: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 25326277
......@@ -91,8 +91,6 @@ LDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64+4'
LDFLAGS += -EB
endif
KBUILD_CFLAGS += -pipe $(cflags-y)
KBUILD_AFLAGS += $(cflags-y)
head-y := arch/sh/kernel/init_task.o
head-$(CONFIG_SUPERH32) += arch/sh/kernel/head_32.o
......@@ -160,57 +158,17 @@ drivers-$(CONFIG_OPROFILE) += arch/sh/oprofile/
boot := arch/sh/boot
ifneq ($(KBUILD_SRC),)
incdir-prefix := $(srctree)/include/asm-sh/
else
incdir-prefix :=
endif
# Update machine arch and proc symlinks if something which affects
# them changed. We use .arch and .mach to indicate when they were
# updated last, otherwise make uses the target directory mtime.
cflags-y += -Iarch/sh/include/$(cpuincdir-y)
cflags-y += $(foreach d, $(incdir-y), -Iarch/sh/include/mach-$(d))
include/asm-sh/.cpu: $(wildcard include/config/cpu/*.h) \
include/config/auto.conf FORCE
@echo ' SYMLINK include/asm-sh/cpu -> include/asm-sh/$(cpuincdir-y)'
$(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi
$(Q)ln -fsn $(incdir-prefix)$(cpuincdir-y) include/asm-sh/cpu
@touch $@
# Most boards have their own mach directories. For the ones that
# don't, just reference the parent directory so the semantics are
# kept roughly the same.
#
# When multiple boards are compiled in at the same time, preference
# for the mach link is given to whichever has a directory for its
# headers. However, this is only a workaround until platforms that
# can live in the same kernel image back away from relying on the
# mach link.
include/asm-sh/.mach: $(wildcard include/config/sh/*.h) \
include/config/auto.conf FORCE
$(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi
$(Q)rm -f include/asm-sh/mach
$(Q)for i in $(incdir-y); do \
if [ -d $(srctree)/include/asm-sh/$$i ]; then \
echo -n ' SYMLINK include/asm-sh/mach -> '; \
echo -e "include/asm-sh/$$i"; \
ln -fsn $(incdir-prefix)$$i \
include/asm-sh/mach; \
else \
if [ ! -d include/asm-sh/mach ]; then \
echo -n ' SYMLINK include/asm-sh/mach -> '; \
echo -e 'include/asm-sh'; \
ln -fsn $(incdir-prefix)../asm-sh include/asm-sh/mach; \
fi; \
fi; \
done
@touch $@
KBUILD_CFLAGS += -pipe $(cflags-y)
KBUILD_CPPFLAGS += $(cflags-y)
KBUILD_AFLAGS += $(cflags-y)
PHONY += maketools FORCE
maketools: include/linux/version.h FORCE
$(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h
$(Q)$(MAKE) $(build)=arch/sh/tools arch/sh/include/asm/machtypes.h
all: $(KBUILD_IMAGE)
......@@ -219,8 +177,7 @@ zImage uImage uImage.srec vmlinux.srec: vmlinux
compressed: zImage
archprepare: include/asm-sh/.cpu include/asm-sh/.mach maketools \
arch/sh/lib64/syscalltab.h
archprepare: maketools arch/sh/lib64/syscalltab.h
archclean:
$(Q)$(MAKE) $(clean)=$(boot)
......@@ -262,6 +219,4 @@ arch/sh/lib64/syscalltab.h: arch/sh/kernel/syscalls_64.S
$(call filechk,gen-syscalltab)
CLEAN_FILES += arch/sh/lib64/syscalltab.h \
include/asm-sh/machtypes.h \
include/asm-sh/cpu include/asm-sh/.cpu \
include/asm-sh/mach include/asm-sh/.mach
arch/sh/include/asm/machtypes.h
......@@ -13,7 +13,7 @@
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/signal.h>
#include <asm/cpu/irq.h>
#include <cpu/irq.h>
#include <asm/page.h>
/* Setup for the SMSC FDC37C935 / LAN91C100FD */
......
......@@ -13,7 +13,7 @@
#include <linux/init.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <asm/cpu/irq.h>
#include <cpu/irq.h>
/*
* Platform Dependent Interrupt Priorities.
......
......@@ -12,7 +12,7 @@
#include <linux/irq.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/dreamcast/sysasic.h>
#include <mach/sysasic.h>
/* Dreamcast System ASIC Hardware Events -
......
......@@ -25,8 +25,8 @@
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/rtc.h>
#include <asm/machvec.h>
#include <asm/mach/sysasic.h>
#include <machvec.h>
#include <mach/sysasic.h>
extern struct hw_interrupt_type systemasic_int;
extern void aica_time_init(void);
......
......@@ -13,7 +13,7 @@
#include <asm/io.h>
#include <asm/hd64461.h>
#include <asm/hp6xx.h>
#include <asm/cpu/dac.h>
#include <cpu/dac.h>
#include <asm/pm.h>
#define STBCR 0xffffff82
......
......@@ -8,7 +8,7 @@
*/
#include <linux/linkage.h>
#include <asm/cpu/mmu_context.h>
#include <cpu/mmu_context.h>
#define k0 r0
#define k1 r1
......
......@@ -16,7 +16,7 @@
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/hp6xx.h>
#include <asm/cpu/dac.h>
#include <cpu/dac.h>
#define SCPCR 0xa4000116
#define SCPDR 0xa4000136
......
......@@ -20,8 +20,8 @@
#include <linux/fs.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/landisk/gio.h>
#include <asm/landisk/iodata_landisk.h>
#include <mach/gio.h>
#include <mach/iodata_landisk.h>
#define DEVCOUNT 4
#define GIO_MINOR 2 /* GIO minor no. */
......
......@@ -16,7 +16,7 @@
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <asm/landisk/iodata_landisk.h>
#include <mach/iodata_landisk.h>
static void disable_landisk_irq(unsigned int irq)
{
......
......@@ -14,7 +14,7 @@
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <asm/landisk/iodata_landisk.h>
#include <mach/iodata_landisk.h>
#include <asm/push-switch.h>
static irqreturn_t psw_irq_handler(int irq, void *arg)
......
......@@ -18,7 +18,7 @@
#include <linux/pm.h>
#include <linux/mm.h>
#include <asm/machvec.h>
#include <asm/landisk/iodata_landisk.h>
#include <mach/iodata_landisk.h>
#include <asm/io.h>
void init_landisk_IRQ(void);
......
......@@ -13,7 +13,7 @@
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <asm/mach/r7780rp.h>
#include <mach/r7780rp.h>
#include <asm/push-switch.h>
static irqreturn_t psw_irq_handler(int irq, void *arg)
......
......@@ -6,7 +6,7 @@
*/
#include <linux/kernel.h>
#include <asm/io.h>
#include <asm/mach/se7343.h>
#include <mach/se7343.h>
#define badio(fn, a) panic("bad i/o operation %s for %08lx.", #fn, a)
......
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/mtd/physmap.h>
#include <asm/machvec.h>
#include <asm/mach/se7343.h>
#include <machvec.h>
#include <mach/se7343.h>
#include <asm/heartbeat.h>
#include <asm/irq.h>
#include <asm/io.h>
......
......@@ -11,8 +11,8 @@
#include <linux/platform_device.h>
#include <asm/io.h>
#include <asm/rtc.h>
#include <asm/sh03/io.h>
#include <asm/sh03/sh03.h>
#include <mach/io.h>
#include <mach/sh03.h>
#include <asm/addrspace.h>
static void __init init_sh03_IRQ(void)
......
......@@ -22,7 +22,7 @@
#include <asm/snapgear.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/cpu/timer.h>
#include <cpu/timer.h>
/*
* EraseConfig handling functions
......
......@@ -14,8 +14,8 @@
* Copyright (C) 2002 Stuart Menefy (stuart.menefy@st.com)
*/
#include <asm/cache.h>
#include <asm/cpu/mmu_context.h>
#include <asm/cpu/registers.h>
#include <cpu/mmu_context.h>
#include <cpu/registers.h>
/*
* Fixed TLB entries to identity map the beginning of RAM
......
......@@ -14,8 +14,8 @@
#include <linux/module.h>
#include <linux/interrupt.h>
#include <asm/cacheflush.h>
#include <asm/mach/sysasic.h>
#include <asm/mach/dma.h>
#include <mach/sysasic.h>
#include <mach/dma.h>
#include <asm/dma.h>
struct g2_channel {
......
......@@ -13,8 +13,8 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <asm/mach/sysasic.h>
#include <asm/mach/dma.h>
#include <mach/sysasic.h>
#include <mach/dma.h>
#include <asm/dma.h>
#include <asm/io.h>
......
......@@ -14,7 +14,7 @@
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <asm/dreamcast/dma.h>
#include <mach/dma.h>
#include <asm/dma.h>
#include <asm/io.h>
#include "dma-sh.h"
......
......@@ -11,7 +11,7 @@
#ifndef __DMA_SH_H
#define __DMA_SH_H
#include <asm/cpu/dma.h>
#include <cpu/dma.h>
/* Definitions for the SuperH DMAC */
#define REQ_L 0x00000000
......
......@@ -26,7 +26,7 @@
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/mach/pci.h>
#include <mach/pci.h>
static void __init gapspci_fixup_resources(struct pci_dev *dev)
{
......
......@@ -2,7 +2,7 @@
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/types.h>
#include <asm/cpu/irq.h>
#include <cpu/irq.h>
#include "pci-sh5.h"
static inline u8 bridge_swizzle(u8 pin, u8 slot)
......
......@@ -26,7 +26,7 @@
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/mach/pci.h>
#include <mach/pci.h>
static struct resource gapspci_io_resource = {
.name = "GAPSPCI IO",
......
......@@ -19,7 +19,7 @@
#include <linux/delay.h>
#include <linux/types.h>
#include <linux/irq.h>
#include <asm/cpu/irq.h>
#include <cpu/irq.h>
#include <asm/pci.h>
#include <asm/io.h>
#include "pci-sh5.h"
......
......@@ -5,7 +5,7 @@
* Copyright (C) 2004 Andriy Skulysh
*/
#include <asm/cpu/adc.h>
#include <cpu/adc.h>
int adc_single(unsigned int channel);
......
......@@ -12,7 +12,7 @@
#ifdef __KERNEL__
#include <asm/cpu/addrspace.h>
#include <cpu/addrspace.h>
/* If this CPU supports segmentation, hook up the helpers */
#ifdef P1SEG
......
......@@ -10,7 +10,7 @@
#ifdef __KERNEL__
#include <linux/init.h>
#include <asm/cpu/cache.h>
#include <cpu/cache.h>
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
......
......@@ -27,7 +27,7 @@
#define __flush_purge_region(start, size) do { (void)(start); } while (0)
#define __flush_invalidate_region(start, size) do { (void)(start); } while (0)
#else
#include <asm/cpu/cacheflush.h>
#include <cpu/cacheflush.h>
/*
* Consistent DMA requires that the __flush_xxx() primitives must be set
......
......@@ -15,7 +15,7 @@
#include <linux/wait.h>
#include <linux/sched.h>
#include <linux/sysdev.h>
#include <asm/cpu/dma.h>
#include <cpu/dma.h>
/* The maximum address that we can perform a DMA transfer to on this platform */
/* Don't define MAX_DMA_ADDRESS; it's useless on the SuperH and any
......
......@@ -12,7 +12,7 @@
#define __ASM_SH_FREQ_H
#ifdef __KERNEL__
#include <asm/cpu/freq.h>
#include <cpu/freq.h>
#endif /* __KERNEL__ */
#endif /* __ASM_SH_FREQ_H */
......@@ -13,7 +13,7 @@
#define __ASM_SH_GPIO_H
#if defined(CONFIG_CPU_SH3)
#include <asm/cpu/gpio.h>
#include <cpu/gpio.h>
#endif
#endif /* __ASM_SH_GPIO_H */
......@@ -51,7 +51,7 @@ extern void irq_ctx_exit(int cpu);
#endif
#ifdef CONFIG_CPU_SH5
#include <asm/cpu/irq.h>
#include <cpu/irq.h>
#endif
#endif /* __ASM_SH_IRQ_H */
#ifndef __ASM_SH_IRQFLAGS_64_H
#define __ASM_SH_IRQFLAGS_64_H
#include <asm/cpu/registers.h>
#include <cpu/registers.h>
#define SR_MASK_LL 0x00000000000000f0LL
#define SR_BL_LL 0x0000000010000000LL
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment