Skip to content

Commit

Permalink
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-…
Browse files Browse the repository at this point in the history
…linus

* 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus:
  MIPS: Set io_map_base for several PCI bridges lacking it
  MIPS: Alchemy: Define eth platform devices in the correct order
  MIPS: BCM63xx: Prevent second enet registration on BCM6338
  MIPS: Quit using undefined behavior of ADDU in 64-bit atomic operations.
  MIPS: N32: Define getdents64.
  MIPS: MTX-1: Fix PCI on the MeshCube and related boards
  MIPS: Make init_vdso a subsys_initcall.
  MIPS: "Fix" useless 'init_vdso successfully' message.
  MIPS: PowerTV: Move register setup to before reading registers.
  SOUND: Au1000: Fix section mismatch
  VIDEO: Au1100fb: Fix section mismatch
  VIDEO: PMAGB-B: Fix section mismatch
  VIDEO: PMAG-BA: Fix section mismatch
  NET: declance: Fix section mismatches
  VIDEO. gbefb: Fix section mismatches.
  • Loading branch information
Linus Torvalds committed Jul 26, 2010
2 parents 5620ae2 + 8faf2e6 commit 863da95
Show file tree
Hide file tree
Showing 19 changed files with 61 additions and 53 deletions.
9 changes: 5 additions & 4 deletions arch/mips/alchemy/common/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,20 +435,21 @@ static struct platform_device *au1xxx_platform_devices[] __initdata = {
static int __init au1xxx_platform_init(void)
{
unsigned int uartclk = get_au1x00_uart_baud_base() * 16;
int i;
int err, i;

/* Fill up uartclk. */
for (i = 0; au1x00_uart_data[i].flags; i++)
au1x00_uart_data[i].uartclk = uartclk;

err = platform_add_devices(au1xxx_platform_devices,
ARRAY_SIZE(au1xxx_platform_devices));
#ifndef CONFIG_SOC_AU1100
/* Register second MAC if enabled in pinfunc */
if (!(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2))
if (!err && !(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2))
platform_device_register(&au1xxx_eth1_device);
#endif

return platform_add_devices(au1xxx_platform_devices,
ARRAY_SIZE(au1xxx_platform_devices));
return err;
}

arch_initcall(au1xxx_platform_init);
8 changes: 3 additions & 5 deletions arch/mips/alchemy/mtx-1/board_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ static void mtx1_power_off(void)

void __init board_setup(void)
{
alchemy_gpio2_enable();

#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
/* Enable USB power switch */
alchemy_gpio_direction_output(204, 0);
Expand Down Expand Up @@ -117,11 +115,11 @@ mtx1_pci_idsel(unsigned int devsel, int assert)

if (assert && devsel != 0)
/* Suppress signal to Cardbus */
gpio_set_value(1, 0); /* set EXT_IO3 OFF */
alchemy_gpio_set_value(1, 0); /* set EXT_IO3 OFF */
else
gpio_set_value(1, 1); /* set EXT_IO3 ON */
alchemy_gpio_set_value(1, 1); /* set EXT_IO3 ON */

au_sync_udelay(1);
udelay(1);
return 1;
}

Expand Down
3 changes: 3 additions & 0 deletions arch/mips/bcm63xx/dev-enet.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ int __init bcm63xx_enet_register(int unit,
if (unit > 1)
return -ENODEV;

if (unit == 1 && BCMCPU_IS_6338())
return -ENODEV;

if (!shared_device_registered) {
shared_res[0].start = bcm63xx_regset_address(RSET_ENETDMA);
shared_res[0].end = shared_res[0].start;
Expand Down
24 changes: 12 additions & 12 deletions arch/mips/include/asm/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ static __inline__ void atomic64_add(long i, atomic64_t * v)
__asm__ __volatile__(
" .set mips3 \n"
"1: lld %0, %1 # atomic64_add \n"
" addu %0, %2 \n"
" daddu %0, %2 \n"
" scd %0, %1 \n"
" beqzl %0, 1b \n"
" .set mips0 \n"
Expand All @@ -446,7 +446,7 @@ static __inline__ void atomic64_add(long i, atomic64_t * v)
__asm__ __volatile__(
" .set mips3 \n"
"1: lld %0, %1 # atomic64_add \n"
" addu %0, %2 \n"
" daddu %0, %2 \n"
" scd %0, %1 \n"
" beqz %0, 2f \n"
" .subsection 2 \n"
Expand Down Expand Up @@ -479,7 +479,7 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v)
__asm__ __volatile__(
" .set mips3 \n"
"1: lld %0, %1 # atomic64_sub \n"
" subu %0, %2 \n"
" dsubu %0, %2 \n"
" scd %0, %1 \n"
" beqzl %0, 1b \n"
" .set mips0 \n"
Expand All @@ -491,7 +491,7 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v)
__asm__ __volatile__(
" .set mips3 \n"
"1: lld %0, %1 # atomic64_sub \n"
" subu %0, %2 \n"
" dsubu %0, %2 \n"
" scd %0, %1 \n"
" beqz %0, 2f \n"
" .subsection 2 \n"
Expand Down Expand Up @@ -524,10 +524,10 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v)
__asm__ __volatile__(
" .set mips3 \n"
"1: lld %1, %2 # atomic64_add_return \n"
" addu %0, %1, %3 \n"
" daddu %0, %1, %3 \n"
" scd %0, %2 \n"
" beqzl %0, 1b \n"
" addu %0, %1, %3 \n"
" daddu %0, %1, %3 \n"
" .set mips0 \n"
: "=&r" (result), "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter)
Expand All @@ -538,10 +538,10 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v)
__asm__ __volatile__(
" .set mips3 \n"
"1: lld %1, %2 # atomic64_add_return \n"
" addu %0, %1, %3 \n"
" daddu %0, %1, %3 \n"
" scd %0, %2 \n"
" beqz %0, 2f \n"
" addu %0, %1, %3 \n"
" daddu %0, %1, %3 \n"
" .subsection 2 \n"
"2: b 1b \n"
" .previous \n"
Expand Down Expand Up @@ -576,10 +576,10 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
__asm__ __volatile__(
" .set mips3 \n"
"1: lld %1, %2 # atomic64_sub_return \n"
" subu %0, %1, %3 \n"
" dsubu %0, %1, %3 \n"
" scd %0, %2 \n"
" beqzl %0, 1b \n"
" subu %0, %1, %3 \n"
" dsubu %0, %1, %3 \n"
" .set mips0 \n"
: "=&r" (result), "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter)
Expand All @@ -590,10 +590,10 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
__asm__ __volatile__(
" .set mips3 \n"
"1: lld %1, %2 # atomic64_sub_return \n"
" subu %0, %1, %3 \n"
" dsubu %0, %1, %3 \n"
" scd %0, %2 \n"
" beqz %0, 2f \n"
" subu %0, %1, %3 \n"
" dsubu %0, %1, %3 \n"
" .subsection 2 \n"
"2: b 1b \n"
" .previous \n"
Expand Down
5 changes: 3 additions & 2 deletions arch/mips/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -984,16 +984,17 @@
#define __NR_perf_event_open (__NR_Linux + 296)
#define __NR_accept4 (__NR_Linux + 297)
#define __NR_recvmmsg (__NR_Linux + 298)
#define __NR_getdents64 (__NR_Linux + 299)

/*
* Offset of the last N32 flavoured syscall
*/
#define __NR_Linux_syscalls 298
#define __NR_Linux_syscalls 299

#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */

#define __NR_N32_Linux 6000
#define __NR_N32_Linux_syscalls 298
#define __NR_N32_Linux_syscalls 299

#ifdef __KERNEL__

Expand Down
1 change: 1 addition & 0 deletions arch/mips/kernel/scall64-n32.S
Original file line number Diff line number Diff line change
Expand Up @@ -419,4 +419,5 @@ EXPORT(sysn32_call_table)
PTR sys_perf_event_open
PTR sys_accept4
PTR compat_sys_recvmmsg
PTR sys_getdents
.size sysn32_call_table,.-sysn32_call_table
4 changes: 1 addition & 3 deletions arch/mips/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,9 @@ static int __init init_vdso(void)

vunmap(vdso);

pr_notice("init_vdso successfull\n");

return 0;
}
device_initcall(init_vdso);
subsys_initcall(init_vdso);

static unsigned long vdso_addr(unsigned long start)
{
Expand Down
2 changes: 2 additions & 0 deletions arch/mips/mti-malta/malta-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ void __init mips_pcibios_init(void)
iomem_resource.end &= 0xfffffffffULL; /* 64 GB */
ioport_resource.end = controller->io_resource->end;

controller->io_map_base = mips_io_port_base;

register_pci_controller(controller);
}

Expand Down
1 change: 1 addition & 0 deletions arch/mips/nxp/pnx8550/common/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ extern struct pci_ops pnx8550_pci_ops;

static struct pci_controller pnx8550_controller = {
.pci_ops = &pnx8550_pci_ops,
.io_map_base = PNX8550_PORT_BASE,
.io_resource = &pci_io_resource,
.mem_resource = &pci_mem_resource,
};
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/nxp/pnx8550/common/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void __init plat_mem_setup(void)
PNX8550_GLB2_ENAB_INTA_O = 0;

/* IO/MEM resources. */
set_io_port_base(KSEG1);
set_io_port_base(PNX8550_PORT_BASE);
ioport_resource.start = 0;
ioport_resource.end = ~0;
iomem_resource.start = 0;
Expand Down
1 change: 1 addition & 0 deletions arch/mips/pci/ops-pmcmsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,7 @@ static struct pci_controller msp_pci_controller = {
.pci_ops = &msp_pci_ops,
.mem_resource = &pci_mem_resource,
.mem_offset = 0,
.io_map_base = MSP_PCI_IOSPACE_BASE,
.io_resource = &pci_io_resource,
.io_offset = 0
};
Expand Down
1 change: 1 addition & 0 deletions arch/mips/pci/pci-yosemite.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ static int __init pmc_yosemite_setup(void)
panic(ioremap_failed);

set_io_port_base(io_v_base);
py_controller.io_map_base = io_v_base;
TITAN_WRITE(RM9000x2_OCD_LKM7, TITAN_READ(RM9000x2_OCD_LKM7) | 1);

ioport_resource.end = TITAN_IO_SIZE - 1;
Expand Down
5 changes: 3 additions & 2 deletions arch/mips/powertv/asic/asic_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,9 @@ void __init configure_platform(void)
* it*/
platform_features = FFS_CAPABLE | DISPLAY_CAPABLE;

/* Cronus and Cronus Lite have the same register map */
set_register_map(CRONUS_IO_BASE, &cronus_register_map);

/* ASIC version will determine if this is a real CronusLite or
* Castrati(Cronus) */
chipversion = asic_read(chipver3) << 24;
Expand All @@ -484,8 +487,6 @@ void __init configure_platform(void)
else
asic = ASIC_CRONUSLITE;

/* Cronus and Cronus Lite have the same register map */
set_register_map(CRONUS_IO_BASE, &cronus_register_map);
gp_resources = non_dvr_cronuslite_resources;
pr_info("Platform: 4600 - %s, NON_DVR_CAPABLE, "
"chipversion=0x%08X\n",
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/declance.c
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ static const struct net_device_ops lance_netdev_ops = {
.ndo_set_mac_address = eth_mac_addr,
};

static int __init dec_lance_probe(struct device *bdev, const int type)
static int __devinit dec_lance_probe(struct device *bdev, const int type)
{
static unsigned version_printed;
static const char fmt[] = "declance%d";
Expand Down Expand Up @@ -1326,7 +1326,7 @@ static void __exit dec_lance_platform_remove(void)
}

#ifdef CONFIG_TC
static int __init dec_lance_tc_probe(struct device *dev);
static int __devinit dec_lance_tc_probe(struct device *dev);
static int __exit dec_lance_tc_remove(struct device *dev);

static const struct tc_device_id dec_lance_tc_table[] = {
Expand All @@ -1345,7 +1345,7 @@ static struct tc_driver dec_lance_tc_driver = {
},
};

static int __init dec_lance_tc_probe(struct device *dev)
static int __devinit dec_lance_tc_probe(struct device *dev)
{
int status = dec_lance_probe(dev, PMAD_LANCE);
if (!status)
Expand Down
6 changes: 3 additions & 3 deletions drivers/video/au1100fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ struct fb_bitfield rgb_bitfields[][4] =
{ { 8, 4, 0 }, { 4, 4, 0 }, { 0, 4, 0 }, { 0, 0, 0 } },
};

static struct fb_fix_screeninfo au1100fb_fix __initdata = {
static struct fb_fix_screeninfo au1100fb_fix __devinitdata = {
.id = "AU1100 FB",
.xpanstep = 1,
.ypanstep = 1,
.type = FB_TYPE_PACKED_PIXELS,
.accel = FB_ACCEL_NONE,
};

static struct fb_var_screeninfo au1100fb_var __initdata = {
static struct fb_var_screeninfo au1100fb_var __devinitdata = {
.activate = FB_ACTIVATE_NOW,
.height = -1,
.width = -1,
Expand Down Expand Up @@ -458,7 +458,7 @@ static struct fb_ops au1100fb_ops =

/* AU1100 LCD controller device driver */

static int __init au1100fb_drv_probe(struct platform_device *dev)
static int __devinit au1100fb_drv_probe(struct platform_device *dev)
{
struct au1100fb_device *fbdev = NULL;
struct resource *regs_res;
Expand Down
16 changes: 8 additions & 8 deletions drivers/video/gbefb.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ static uint32_t pseudo_palette[16];
static uint32_t gbe_cmap[256];
static int gbe_turned_on; /* 0 turned off, 1 turned on */

static char *mode_option __initdata = NULL;
static char *mode_option __devinitdata = NULL;

/* default CRT mode */
static struct fb_var_screeninfo default_var_CRT __initdata = {
static struct fb_var_screeninfo default_var_CRT __devinitdata = {
/* 640x480, 60 Hz, Non-Interlaced (25.175 MHz dotclock) */
.xres = 640,
.yres = 480,
Expand Down Expand Up @@ -125,7 +125,7 @@ static struct fb_var_screeninfo default_var_CRT __initdata = {
};

/* default LCD mode */
static struct fb_var_screeninfo default_var_LCD __initdata = {
static struct fb_var_screeninfo default_var_LCD __devinitdata = {
/* 1600x1024, 8 bpp */
.xres = 1600,
.yres = 1024,
Expand Down Expand Up @@ -157,7 +157,7 @@ static struct fb_var_screeninfo default_var_LCD __initdata = {

/* default modedb mode */
/* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */
static struct fb_videomode default_mode_CRT __initdata = {
static struct fb_videomode default_mode_CRT __devinitdata = {
.refresh = 60,
.xres = 640,
.yres = 480,
Expand All @@ -172,7 +172,7 @@ static struct fb_videomode default_mode_CRT __initdata = {
.vmode = FB_VMODE_NONINTERLACED,
};
/* 1600x1024 SGI flatpanel 1600sw */
static struct fb_videomode default_mode_LCD __initdata = {
static struct fb_videomode default_mode_LCD __devinitdata = {
/* 1600x1024, 8 bpp */
.xres = 1600,
.yres = 1024,
Expand All @@ -186,8 +186,8 @@ static struct fb_videomode default_mode_LCD __initdata = {
.vmode = FB_VMODE_NONINTERLACED,
};

static struct fb_videomode *default_mode __initdata = &default_mode_CRT;
static struct fb_var_screeninfo *default_var __initdata = &default_var_CRT;
static struct fb_videomode *default_mode __devinitdata = &default_mode_CRT;
static struct fb_var_screeninfo *default_var __devinitdata = &default_var_CRT;

static int flat_panel_enabled = 0;

Expand Down Expand Up @@ -1098,7 +1098,7 @@ static void gbefb_create_sysfs(struct device *dev)
* Initialization
*/

static int __init gbefb_setup(char *options)
static int __devinit gbefb_setup(char *options)
{
char *this_opt;

Expand Down
6 changes: 3 additions & 3 deletions drivers/video/pmag-ba-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct pmagbafb_par {
};


static struct fb_var_screeninfo pmagbafb_defined __initdata = {
static struct fb_var_screeninfo pmagbafb_defined __devinitdata = {
.xres = 1024,
.yres = 864,
.xres_virtual = 1024,
Expand All @@ -68,7 +68,7 @@ static struct fb_var_screeninfo pmagbafb_defined __initdata = {
.vmode = FB_VMODE_NONINTERLACED,
};

static struct fb_fix_screeninfo pmagbafb_fix __initdata = {
static struct fb_fix_screeninfo pmagbafb_fix __devinitdata = {
.id = "PMAG-BA",
.smem_len = (1024 * 1024),
.type = FB_TYPE_PACKED_PIXELS,
Expand Down Expand Up @@ -142,7 +142,7 @@ static void __init pmagbafb_erase_cursor(struct fb_info *info)
}


static int __init pmagbafb_probe(struct device *dev)
static int __devinit pmagbafb_probe(struct device *dev)
{
struct tc_dev *tdev = to_tc_dev(dev);
resource_size_t start, len;
Expand Down
Loading

0 comments on commit 863da95

Please sign in to comment.