Commit afdef69c authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc32: Pass task_struct to schedule_tail() in ret_from_fork
  apbuart: Depend upon sparc.
  sparc64: Fix section mis-match errors.
  sparc32,leon: Fixed APBUART frequency detection
  sparc32, leon: APBUART driver must use archdata to get IRQ number
  sparc: Hook up syncfs system call.
parents 84daeb09 47c7c97a
......@@ -403,8 +403,9 @@
#define __NR_name_to_handle_at 332
#define __NR_open_by_handle_at 333
#define __NR_clock_adjtime 334
#define __NR_syncfs 335
#define NR_syscalls 335
#define NR_syscalls 336
#ifdef __32bit_syscall_numbers__
/* Sparc 32-bit only has the "setresuid32", "getresuid32" variants,
......
......@@ -93,7 +93,7 @@ void auxio_set_lte(int on)
}
EXPORT_SYMBOL(auxio_set_lte);
static struct of_device_id __initdata auxio_match[] = {
static const struct of_device_id auxio_match[] = {
{
.name = "auxio",
},
......
......@@ -140,7 +140,7 @@ static int __devinit clock_board_probe(struct platform_device *op)
goto out;
}
static struct of_device_id __initdata clock_board_match[] = {
static const struct of_device_id clock_board_match[] = {
{
.name = "clock-board",
},
......@@ -245,7 +245,7 @@ static int __devinit fhc_probe(struct platform_device *op)
goto out;
}
static struct of_device_id __initdata fhc_match[] = {
static const struct of_device_id fhc_match[] = {
{
.name = "fhc",
},
......
......@@ -1218,7 +1218,7 @@ static int ds_remove(struct vio_dev *vdev)
return 0;
}
static struct vio_device_id __initdata ds_match[] = {
static const struct vio_device_id ds_match[] = {
{
.type = "domain-services-port",
},
......
......@@ -1283,7 +1283,7 @@ linux_syscall_trace:
.globl ret_from_fork
ret_from_fork:
call schedule_tail
mov %g3, %o0
ld [%g3 + TI_TASK], %o0
b ret_sys_call
ld [%sp + STACKFRAME_SZ + PT_I0], %o0
......
......@@ -107,7 +107,7 @@ static struct mdesc_handle * __init mdesc_memblock_alloc(unsigned int mdesc_size
return hp;
}
static void mdesc_memblock_free(struct mdesc_handle *hp)
static void __init mdesc_memblock_free(struct mdesc_handle *hp)
{
unsigned int alloc_size;
unsigned long start;
......
......@@ -496,7 +496,7 @@ static int __devinit fire_probe(struct platform_device *op)
return err;
}
static struct of_device_id __initdata fire_match[] = {
static const struct of_device_id fire_match[] = {
{
.name = "pci",
.compatible = "pciex108e,80f0",
......
......@@ -592,7 +592,7 @@ static int __devinit psycho_probe(struct platform_device *op)
return err;
}
static struct of_device_id __initdata psycho_match[] = {
static const struct of_device_id psycho_match[] = {
{
.name = "pci",
.compatible = "pci108e,8000",
......
......@@ -581,7 +581,7 @@ static int __devinit sabre_probe(struct platform_device *op)
return err;
}
static struct of_device_id __initdata sabre_match[] = {
static const struct of_device_id sabre_match[] = {
{
.name = "pci",
.compatible = "pci108e,a001",
......
......@@ -1470,7 +1470,7 @@ static int __devinit schizo_probe(struct platform_device *op)
* and pci108e,8001. So list the chips in reverse chronological
* order.
*/
static struct of_device_id __initdata schizo_match[] = {
static const struct of_device_id schizo_match[] = {
{
.name = "pci",
.compatible = "pci108e,a801",
......
......@@ -998,7 +998,7 @@ static int __devinit pci_sun4v_probe(struct platform_device *op)
return err;
}
static struct of_device_id __initdata pci_sun4v_match[] = {
static const struct of_device_id pci_sun4v_match[] = {
{
.name = "pci",
.compatible = "SUNW,sun4v-pci",
......
......@@ -52,7 +52,7 @@ static int __devinit power_probe(struct platform_device *op)
return 0;
}
static struct of_device_id __initdata power_match[] = {
static const struct of_device_id power_match[] = {
{
.name = "power",
},
......
......@@ -84,4 +84,4 @@ sys_call_table:
/*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv
/*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init
/*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime
/*335*/ .long sys_syncfs
......@@ -85,6 +85,7 @@ sys_call_table32:
/*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv
.word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init
/*330*/ .word sys32_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime
.word sys_syncfs
#endif /* CONFIG_COMPAT */
......@@ -161,3 +162,4 @@ sys_call_table:
/*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv
.word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init
/*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime
.word sys_syncfs
......@@ -442,7 +442,7 @@ static int __devinit rtc_probe(struct platform_device *op)
return platform_device_register(&rtc_cmos_device);
}
static struct of_device_id __initdata rtc_match[] = {
static const struct of_device_id rtc_match[] = {
{
.name = "rtc",
.compatible = "m5819",
......@@ -487,7 +487,7 @@ static int __devinit bq4802_probe(struct platform_device *op)
return platform_device_register(&rtc_bq4802_device);
}
static struct of_device_id __initdata bq4802_match[] = {
static const struct of_device_id bq4802_match[] = {
{
.name = "rtc",
.compatible = "bq4802",
......@@ -552,7 +552,7 @@ static int __devinit mostek_probe(struct platform_device *op)
return platform_device_register(&m48t59_rtc);
}
static struct of_device_id __initdata mostek_match[] = {
static const struct of_device_id mostek_match[] = {
{
.name = "eeprom",
},
......
......@@ -1506,7 +1506,7 @@ config SERIAL_BCM63XX_CONSOLE
config SERIAL_GRLIB_GAISLER_APBUART
tristate "GRLIB APBUART serial support"
depends on OF
depends on OF && SPARC
select SERIAL_CORE
---help---
Add support for the GRLIB APBUART serial port.
......
......@@ -555,10 +555,9 @@ static struct uart_driver grlib_apbuart_driver = {
static int __devinit apbuart_probe(struct platform_device *op)
{
int i = -1;
int i;
struct uart_port *port = NULL;
i = 0;
for (i = 0; i < grlib_apbuart_port_nr; i++) {
if (op->dev.of_node == grlib_apbuart_nodes[i])
break;
......@@ -566,6 +565,7 @@ static int __devinit apbuart_probe(struct platform_device *op)
port = &grlib_apbuart_ports[i];
port->dev = &op->dev;
port->irq = op->archdata.irqs[0];
uart_add_one_port(&grlib_apbuart_driver, (struct uart_port *) port);
......@@ -598,24 +598,12 @@ static struct platform_driver grlib_apbuart_of_driver = {
static int grlib_apbuart_configure(void)
{
struct device_node *np, *rp;
const u32 *prop;
int freq_khz, line = 0;
/* Get bus frequency */
rp = of_find_node_by_path("/");
if (!rp)
return -ENODEV;
rp = of_get_next_child(rp, NULL);
if (!rp)
return -ENODEV;
prop = of_get_property(rp, "clock-frequency", NULL);
if (!prop)
return -ENODEV;
freq_khz = *prop;
struct device_node *np;
int line = 0;
for_each_matching_node(np, apbuart_match) {
const int *irqs, *ampopts;
const int *ampopts;
const u32 *freq_hz;
const struct amba_prom_registers *regs;
struct uart_port *port;
unsigned long addr;
......@@ -623,11 +611,11 @@ static int grlib_apbuart_configure(void)
ampopts = of_get_property(np, "ampopts", NULL);
if (ampopts && (*ampopts == 0))
continue; /* Ignore if used by another OS instance */
irqs = of_get_property(np, "interrupts", NULL);
regs = of_get_property(np, "reg", NULL);
/* Frequency of APB Bus is frequency of UART */
freq_hz = of_get_property(np, "freq", NULL);
if (!irqs || !regs)
if (!regs || !freq_hz || (*freq_hz == 0))
continue;
grlib_apbuart_nodes[line] = np;
......@@ -638,12 +626,12 @@ static int grlib_apbuart_configure(void)
port->mapbase = addr;
port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map));
port->irq = *irqs;
port->irq = 0;
port->iotype = UPIO_MEM;
port->ops = &grlib_apbuart_ops;
port->flags = UPF_BOOT_AUTOCONF;
port->line = line;
port->uartclk = freq_khz * 1000;
port->uartclk = *freq_hz;
port->fifosize = apbuart_scan_fifo_size((struct uart_port *) port, line);
line++;
......
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