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:
  sh: Fix dreamcast build for IRQ changes.
  sh: Fix clock multiplier on SH7722.
  sh: Wire up kdump crash kernel exec in die().
  sh: sr.bl toggling around idle sleep.
  sh: disable genrtc support.
  fs: Kill sh dependency for binfmt_flat.
  sh: Disable psw support for R7785RP.
  sh: Fix page size alignment in __copy_user_page().
  sh: Fix up various compile warnings for SE boards.
  sh: Wire up signalfd/timerfd/eventfd syscalls.
  sh: revert addition of page fault notifiers
  spelling fixes: arch/sh/
  input: hp680_ts compile fixes.
  sh: landisk: Header cleanups.
  sh: landisk: rtc-rs5c313 support.
  sh: Kill off pmb slab cache destructor.
  sh: Fix up psw build rules for r7780rp.
  sh: Shut up compiler warnings in __do_page_fault().
  • Loading branch information
Linus Torvalds committed May 23, 2007
2 parents 7992018 + 31d106c commit cdb7532
Show file tree
Hide file tree
Showing 39 changed files with 164 additions and 185 deletions.
2 changes: 1 addition & 1 deletion arch/sh/boards/landisk/gio.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static int gio_ioctl(struct inode *inode, struct file *filp,
}

switch (cmd) {
case GIODRV_IOCSGIOSETADDR: /* addres set */
case GIODRV_IOCSGIOSETADDR: /* address set */
addr = data;
break;

Expand Down
6 changes: 6 additions & 0 deletions arch/sh/boards/landisk/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,14 @@ static struct platform_device cf_ide_device = {
},
};

static struct platform_device rtc_device = {
.name = "rs5c313",
.id = -1,
};

static struct platform_device *landisk_devices[] __initdata = {
&cf_ide_device,
&rtc_device,
};

static int __init landisk_devices_setup(void)
Expand Down
5 changes: 4 additions & 1 deletion arch/sh/boards/renesas/r7780rp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
#
irqinit-y := irq-r7780rp.o
irqinit-$(CONFIG_SH_R7785RP) := irq-r7785rp.o
obj-y := setup.o irq.o $(irqinit-y)

ifneq ($(CONFIG_SH_R7785RP),y)
obj-$(CONFIG_PUSH_SWITCH) += psw.o
obj-y := setup.o irq.o $(irqinit-y)
endif
2 changes: 1 addition & 1 deletion arch/sh/boards/snapgear/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static void ds1302_writebyte(unsigned int addr, unsigned int val)
static void ds1302_reset(void)
{
unsigned long flags;
/* Hardware dependant reset/init */
/* Hardware dependent reset/init */
local_irq_save(flags);
set_dirp(get_dirp() | RTC_RESET | RTC_IODATA | RTC_SCLK);
set_dp(get_dp() & ~(RTC_RESET | RTC_IODATA | RTC_SCLK));
Expand Down
6 changes: 3 additions & 3 deletions arch/sh/boards/superh/microdev/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ void microdev_outb(unsigned char b, unsigned long port)
/*
* There is a board feature with the current SH4-202 MicroDev in
* that the 2 byte enables (nBE0 and nBE1) are tied together (and
* to the Chip Select Line (Ethernet_CS)). Due to this conectivity,
* to the Chip Select Line (Ethernet_CS)). Due to this connectivity,
* it is not possible to safely perform 8-bit writes to the
* Ethernet registers, as 16-bits will be consumed from the Data
* lines (corrupting the other byte). Hence, this function is
* written to impliment 16-bit read/modify/write for all byte-wide
* acceses.
* written to implement 16-bit read/modify/write for all byte-wide
* accesses.
*
* Note: there is no problem with byte READS (even or odd).
*
Expand Down
6 changes: 3 additions & 3 deletions arch/sh/boards/superh/microdev/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static void disable_microdev_irq(unsigned int irq)

fpgaIrq = fpgaIrqTable[irq].fpgaIrq;

/* disable interupts on the FPGA INTC register */
/* disable interrupts on the FPGA INTC register */
ctrl_outl(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTDSB_REG);
}

Expand All @@ -125,7 +125,7 @@ static void enable_microdev_irq(unsigned int irq)
priorities |= MICRODEV_FPGA_INTPRI_LEVEL(fpgaIrq, pri);
ctrl_outl(priorities, priorityReg);

/* enable interupts on the FPGA INTC register */
/* enable interrupts on the FPGA INTC register */
ctrl_outl(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTENB_REG);
}

Expand All @@ -152,7 +152,7 @@ extern void __init init_microdev_irq(void)
{
int i;

/* disable interupts on the FPGA INTC register */
/* disable interrupts on the FPGA INTC register */
ctrl_outl(~0ul, MICRODEV_FPGA_INTDSB_REG);

for (i = 0; i < NUM_EXTERNAL_IRQS; i++)
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/boards/superh/microdev/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ static int __init smsc_superio_setup(void)
SMSC_WRITE_INDEXED(0x00, 0xc7); /* GP47 = nIOWOP */
SMSC_WRITE_INDEXED(0x08, 0xe8); /* GP20 = nIDE2_OE */

/* Exit the configuraton state */
/* Exit the configuration state */
outb(SMSC_EXIT_CONFIG_KEY, SMSC_CONFIG_PORT_ADDR);

return 0;
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/boards/unknown/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* May be copied or modified under the terms of the GNU General Public
* License. See linux/COPYING for more information.
*
* Setup code for an unknown machine (internal peripherials only)
* Setup code for an unknown machine (internal peripherals only)
*
* This is the simplest of all boards, and serves only as a quick and dirty
* method to start debugging a new board during bring-up until proper board
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/drivers/dma/dma-api.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static int search_cap(const char **haystack, const char *needle)
/**
* request_dma_bycap - Allocate a DMA channel based on its capabilities
* @dmac: List of DMA controllers to search
* @caps: List of capabilites
* @caps: List of capabilities
*
* Search all channels of all DMA controllers to find a channel which
* matches the requested capabilities. The result is the channel
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/drivers/dma/dma-isa.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* NOTE: ops->xfer() is the preferred way of doing things. However, there
* are some users of the ISA DMA API that exist in common code that we
* don't necessarily want to go out of our way to break, so we still
* allow for some compatability at that level. Any new code is strongly
* allow for some compatibility at that level. Any new code is strongly
* advised to run far away from the ISA DMA API and use the SH DMA API
* directly.
*/
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/drivers/dma/dmabrg.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* 9 | HAC1/SSI1 | rec | half done | DMABRGI2
*
* all can be enabled/disabled in the DMABRGCR register,
* as well as checked if they occured.
* as well as checked if they occurred.
*
* DMABRGI0 services USB DMA Address errors, but it still must be
* enabled/acked in the DMABRGCR register. USB-DMA complete indicator
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/drivers/pci/ops-dreamcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct pci_channel board_pci_channels[] = {
*
* Also, we could very easily support both Type 0 and Type 1 configurations
* here, but since it doesn't seem that there is any such implementation in
* existance, we don't bother.
* existence, we don't bother.
*
* I suppose if someone actually gets around to ripping the chip out of
* the BBA and hanging some more devices off of it, then this might be
Expand Down
6 changes: 3 additions & 3 deletions arch/sh/drivers/pci/pci-st40.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ int __init st40pci_init(unsigned memStart, unsigned memSize)
PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER |
PCI_COMMAND_IO);

/* Accesse to the 0xb0000000 -> 0xb6000000 area will go through to 0x10000000 -> 0x16000000
/* Access to the 0xb0000000 -> 0xb6000000 area will go through to 0x10000000 -> 0x16000000
* on the PCI bus. This allows a nice 1-1 bus to phys mapping.
*/

Expand All @@ -315,7 +315,7 @@ int __init st40pci_init(unsigned memStart, unsigned memSize)
ST40PCI_WRITE(CSR_MBAR0, 0);
ST40PCI_WRITE(LSR0, 0x0fff0001);

/* ... and set up the initial incomming window to expose all of RAM */
/* ... and set up the initial incoming window to expose all of RAM */
pci_set_rbar_region(7, memStart, memStart, memSize);

/* Maximise timeout values */
Expand Down Expand Up @@ -473,7 +473,7 @@ static void pci_set_rbar_region(unsigned int region, unsigned long localAddr

mask = r2p2(regionSize) - 0x10000;

/* Diable the region (in case currently in use, should never happen) */
/* Disable the region (in case currently in use, should never happen) */
ST40PCI_WRITE_INDEXED(RSR, region, 0);

/* Start of local address space to publish */
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/drivers/pci/pci-st40.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* May be copied or modified under the terms of the GNU General Public
* License. See linux/COPYING for more information.
*
* Defintions for the ST40 PCI hardware.
* Definitions for the ST40 PCI hardware.
*/

#ifndef __PCI_ST40_H__
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/drivers/superhyway/ops-sh4-202.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static int sh4202_read_vcr(unsigned long base, struct superhyway_vcr_info *vcr)
* Some modules (PBR and ePBR for instance) also appear to have
* VCRL/VCRH flipped in the documentation, but on the SH4-202
* itself it appears that these are all consistently mapped with
* VCRH preceeding VCRL.
* VCRH preceding VCRL.
*
* Do not trust the documentation, for it is evil.
*/
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/kernel/cf-enabler.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*/
#if defined(CONFIG_CPU_SH4)
/* SH4 can't access PCMCIA interface through P2 area.
* we must remap it with appropreate attribute bit of the page set.
* we must remap it with appropriate attribute bit of the page set.
* this part is based on Greg Banks' hd64465_ss.c implementation - Masahiro Abe */

#if defined(CONFIG_CF_AREA6)
Expand Down
7 changes: 7 additions & 0 deletions arch/sh/kernel/cpu/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@ arch_init_clk_ops(struct clk_ops **ops, int type)
{
}

void __init __attribute__ ((weak))
arch_clk_init(void)
{
}

static int show_clocks(char *buf, char **start, off_t off,
int len, int *eof, void *data)
{
Expand Down Expand Up @@ -314,6 +319,8 @@ int __init clk_init(void)
ret |= clk_register(clk);
}

arch_clk_init();

/* Kick the child clocks.. */
propagate_rate(&master_clk);
propagate_rate(&bus_clk);
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/kernel/cpu/irq/maskreg.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static struct hw_interrupt_type maskreg_irq_type = {
.end = end_maskreg_irq
};

/* actual implementatin */
/* actual implementation */
static unsigned int startup_maskreg_irq(unsigned int irq)
{
enable_maskreg_irq(irq);
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/kernel/cpu/sh4/fpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ restore_fpu(struct task_struct *tsk)
/*
* Load the FPU with signalling NANS. This bit pattern we're using
* has the property that no matter wether considered as single or as
* double precission represents signaling NANS.
* double precision represents signaling NANS.
*/

static void
Expand Down
2 changes: 2 additions & 0 deletions arch/sh/kernel/cpu/sh4/setup-sh7750.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ static struct ipr_data sh7750_ipr_map[] = {
{ 38, 2, 8, 7 }, /* DMAC DMAE */
};

#ifdef CONFIG_CPU_SUBTYPE_SH7751
static struct ipr_data sh7751_ipr_map[] = {
{ 44, 2, 8, 7 }, /* DMAC DMTE4 */
{ 45, 2, 8, 7 }, /* DMAC DMTE5 */
Expand All @@ -117,6 +118,7 @@ static struct ipr_data sh7751_ipr_map[] = {
/*{ 72, INTPRI00, 8, ? },*/ /* TMU3 TUNI */
/*{ 76, INTPRI00, 12, ? },*/ /* TMU4 TUNI */
};
#endif

static unsigned long ipr_offsets[] = {
0xffd00004UL, /* 0: IPRA */
Expand Down
34 changes: 22 additions & 12 deletions arch/sh/kernel/cpu/sh4a/clock-sh7722.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <asm/clock.h>
#include <asm/freq.h>

#define SH7722_PLL_FREQ (32000000/8)
#define N (-1)
#define NM (-2)
#define ROUND_NEAREST 0
Expand Down Expand Up @@ -141,28 +140,36 @@ static void adjust_clocks(int originate, int *l, unsigned long v[],
*/
static int divisors2[] = { 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, 32, 40 };

static void master_clk_recalc(struct clk *clk)
{
unsigned frqcr = ctrl_inl(FRQCR);

clk->rate = CONFIG_SH_PCLK_FREQ * (((frqcr >> 24) & 0x1f) + 1);
}

static void master_clk_init(struct clk *clk)
{
clk_set_rate(clk, clk_get_rate(clk));
clk->parent = NULL;
clk->flags |= CLK_RATE_PROPAGATES;
clk->rate = CONFIG_SH_PCLK_FREQ;
master_clk_recalc(clk);
}

static void master_clk_recalc(struct clk *clk)

static void module_clk_recalc(struct clk *clk)
{
unsigned long frqcr = ctrl_inl(FRQCR);

clk->rate = CONFIG_SH_PCLK_FREQ * (1 + (frqcr >> 24 & 0xF));
clk->rate = clk->parent->rate / (((frqcr >> 24) & 0x1f) + 1);
}

static int master_clk_setrate(struct clk *clk, unsigned long rate, int id)
{
int div = rate / SH7722_PLL_FREQ;
int div = rate / clk->rate;
int master_divs[] = { 2, 3, 4, 6, 8, 16 };
int index;
unsigned long frqcr;

if (rate < SH7722_PLL_FREQ * 2)
return -EINVAL;

for (index = 1; index < ARRAY_SIZE(master_divs); index++)
if (div >= master_divs[index - 1] && div < master_divs[index])
break;
Expand All @@ -185,6 +192,10 @@ static struct clk_ops sh7722_master_clk_ops = {
.set_rate = master_clk_setrate,
};

static struct clk_ops sh7722_module_clk_ops = {
.recalc = module_clk_recalc,
};

struct frqcr_context {
unsigned mask;
unsigned shift;
Expand Down Expand Up @@ -489,7 +500,7 @@ static void sh7722_siu_recalc(struct clk *clk)

if (siu < 0)
return /* siu */ ;
BUG_ON(siu > 1);
BUG_ON(siu > 2);
r = ctrl_inl(sh7722_siu_regs[siu]);
clk->rate = clk->parent->rate * 2 / divisors2[r & 0xF];
}
Expand Down Expand Up @@ -571,7 +582,7 @@ static struct clk *sh7722_clocks[] = {
*/
struct clk_ops *onchip_ops[] = {
&sh7722_master_clk_ops,
&sh7722_frqcr_clk_ops,
&sh7722_module_clk_ops,
&sh7722_frqcr_clk_ops,
&sh7722_frqcr_clk_ops,
};
Expand All @@ -583,7 +594,7 @@ arch_init_clk_ops(struct clk_ops **ops, int type)
*ops = onchip_ops[type];
}

int __init sh7722_clock_init(void)
int __init arch_clk_init(void)
{
struct clk *master;
int i;
Expand All @@ -597,4 +608,3 @@ int __init sh7722_clock_init(void)
clk_put(master);
return 0;
}
arch_initcall(sh7722_clock_init);
4 changes: 2 additions & 2 deletions arch/sh/kernel/kgdb_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* May be copied or modified under the terms of the GNU General Public
* License. See linux/COPYING for more information.
*
* Containes extracts from code by Glenn Engel, Jim Kingdon,
* Contains extracts from code by Glenn Engel, Jim Kingdon,
* David Grothe <dave@gcom.com>, Tigran Aivazian <tigran@sco.com>,
* Amit S. Kale <akale@veritas.com>, William Gatliff <bgat@open-widgets.com>,
* Ben Lee, Steve Chamberlain and Benoit Miller <fulg@iname.com>.
Expand Down Expand Up @@ -85,7 +85,7 @@
*
* Responses can be run-length encoded to save space. A '*' means that
* the next character is an ASCII encoding giving a repeat count which
* stands for that many repititions of the character preceding the '*'.
* stands for that many repetitions of the character preceding the '*'.
* The encoding is n+29, yielding a printable character where n >=3
* (which is where RLE starts to win). Don't use an n > 126.
*
Expand Down
Loading

0 comments on commit cdb7532

Please sign in to comment.