Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
Browse files Browse the repository at this point in the history
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: (24 commits)
  sh: Update r7785rp defconfig.
  sh: mach-type updates.
  sh: Fix up r7780rp highlander CF access size.
  sh: Terminate .eh_frame in VDSO with a 4-byte 0.
  sh: Correct SUBARCH matching.
  sh: Decouple 4k and soft/hardirq stacks.
  sh: Fix optimized __copy_user() movca.l usage.
  sh: Clean up SR.RB Kconfig mess.
  sh: Kill off dead ipr_irq_demux().
  sh: Make SH7750 oprofile compile again.
  sh: Provide a __read_mostly section wrapper.
  sh: linker script tidying.
  sh: Move zero page param defs somewhere sensible.
  sh: Use generic SMP_CACHE_BYTES/L1_CACHE_ALIGN.
  sh: Kill off legacy embedded ramdisk section.
  sh: Fix up early mem cmdline parsing.
  sh: Enable USBF on MS7722SE.
  sh: Add resource of USBF for SH7722.
  maple: Fix maple bus compiler warning
  sh: fix zImage build with >=binutils-2.18
  ...
  • Loading branch information
Linus Torvalds committed Nov 3, 2007
2 parents 468f8af + 352d281 commit 5c27d0f
Show file tree
Hide file tree
Showing 24 changed files with 390 additions and 387 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ export srctree objtree VPATH TOPDIR
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
-e s/arm.*/arm/ -e s/sa110/arm/ \
-e s/s390x/s390/ -e s/parisc64/parisc/ \
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ )
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
-e s/sh[234].*/sh/ )

# Cross compiling and selecting different set of gcc/bin-utils
# ---------------------------------------------------------------------------
Expand Down
8 changes: 2 additions & 6 deletions arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,7 @@ config CPU_HAS_IPR_IRQ
bool

config CPU_HAS_SR_RB
bool "CPU has SR.RB"
depends on CPU_SH3 || CPU_SH4
default y
bool
help
This will enable the use of SR.RB register bank usage. Processors
that are lacking this bit must have another method in place for
Expand Down Expand Up @@ -291,9 +289,7 @@ config SH_DREAMCAST
depends on CPU_SUBTYPE_SH7091
help
Select Dreamcast if configuring for a SEGA Dreamcast.
More information at
<http://www.m17n.org/linux-sh/dreamcast/>. There is a
Dreamcast project is at <http://linuxdc.sourceforge.net/>.
More information at <http://www.linux-sh.org>

config SH_MPC1211
bool "Interface MPC1211"
Expand Down
8 changes: 8 additions & 0 deletions arch/sh/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ config 4KSTACKS
on the VM subsystem for higher order allocations. This option
will also use IRQ stacks to compensate for the reduced stackspace.

config IRQSTACKS
bool "Use separate kernel stacks when processing interrupts"
depends on DEBUG_KERNEL
help
If you say Y here the kernel will use separate kernel stacks
for handling hard and soft interrupts. This can help avoid
overflowing the process kernel stacks.

config SH_KGDB
bool "Include KGDB kernel debugger"
select FRAME_POINTER
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ cflags-y += $(isaflags-y) -ffreestanding
cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \
$(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')

OBJCOPYFLAGS := -O binary -R .note -R .comment -R .stab -R .stabstr -S
OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -R .stab -R .stabstr -S

#
# arch/sh/defconfig doesn't reflect any real hardware, and as such should
Expand Down
71 changes: 71 additions & 0 deletions arch/sh/boards/renesas/r7780rp/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/pata_platform.h>
#include <linux/types.h>
#include <net/ax88796.h>
#include <asm/machvec.h>
#include <asm/r7780rp.h>
#include <asm/clock.h>
Expand Down Expand Up @@ -136,11 +138,50 @@ static struct platform_device heartbeat_device = {
.resource = heartbeat_resources,
};

static struct ax_plat_data ax88796_platdata = {
.flags = AXFLG_HAS_93CX6,
.wordlength = 2,
.dcr_val = 0x1,
.rcr_val = 0x40,
};

static struct resource ax88796_resources[] = {
{
#ifdef CONFIG_SH_R7780RP
.start = 0xa5800400,
.end = 0xa5800400 + (0x20 * 0x2) - 1,
#else
.start = 0xa4100400,
.end = 0xa4100400 + (0x20 * 0x2) - 1,
#endif
.flags = IORESOURCE_MEM,
},
{
.start = IRQ_AX88796,
.end = IRQ_AX88796,
.flags = IORESOURCE_IRQ,
},
};

static struct platform_device ax88796_device = {
.name = "ax88796",
.id = 0,

.dev = {
.platform_data = &ax88796_platdata,
},

.num_resources = ARRAY_SIZE(ax88796_resources),
.resource = ax88796_resources,
};


static struct platform_device *r7780rp_devices[] __initdata = {
&r8a66597_usb_host_device,
&m66592_usb_peripheral_device,
&cf_ide_device,
&heartbeat_device,
&ax88796_device,
};

static int __init r7780rp_devices_setup(void)
Expand Down Expand Up @@ -183,6 +224,34 @@ static void r7780rp_power_off(void)
ctrl_outw(0x0001, PA_POFF);
}

static inline unsigned char is_ide_ioaddr(unsigned long addr)
{
return ((cf_ide_resources[0].start <= addr &&
addr <= cf_ide_resources[0].end) ||
(cf_ide_resources[1].start <= addr &&
addr <= cf_ide_resources[1].end));
}

void highlander_writeb(u8 b, void __iomem *addr)
{
unsigned long tmp = (unsigned long __force)addr;

if (is_ide_ioaddr(tmp))
ctrl_outw((u16)b, tmp);
else
ctrl_outb(b, tmp);
}

u8 highlander_readb(void __iomem *addr)
{
unsigned long tmp = (unsigned long __force)addr;

if (is_ide_ioaddr(tmp))
return ctrl_inw(tmp) & 0xff;
else
return ctrl_inb(tmp);
}

/*
* Initialize the board
*/
Expand Down Expand Up @@ -267,4 +336,6 @@ static struct sh_machine_vector mv_highlander __initmv = {
.mv_setup = highlander_setup,
.mv_init_irq = highlander_init_irq,
.mv_irq_demux = highlander_irq_demux,
.mv_readb = highlander_readb,
.mv_writeb = highlander_writeb,
};
4 changes: 2 additions & 2 deletions arch/sh/boards/se/7722/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ static void __init se7722_setup(char **cmdline_p)

ctrl_outl(0x00051001, MSTPCR0);
ctrl_outl(0x00000000, MSTPCR1);
/* KEYSC, VOU, BEU, CEU, VEU, VPU, LCDC */
ctrl_outl(0xffffbfC0, MSTPCR2);
/* KEYSC, VOU, BEU, CEU, VEU, VPU, LCDC, USB */
ctrl_outl(0xffffb7c0, MSTPCR2);

ctrl_outw(0x0000, PORT_PECR); /* PORT E 1 = IRQ5 ,E 0 = BS */
ctrl_outw(0x1000, PORT_PJCR); /* PORT J 1 = IRQ1,J 0 =IRQ0 */
Expand Down
Loading

0 comments on commit 5c27d0f

Please sign in to comment.