Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319596
b: refs/heads/master
c: 3e25f4f
h: refs/heads/master
v: v3
  • Loading branch information
Manuel Lauss authored and Ralf Baechle committed Jul 23, 2012
1 parent c8f3ca5 commit 149ed3e
Show file tree
Hide file tree
Showing 30 changed files with 597 additions and 259 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 71a1c776d51a12d064d2b824753d259b0f5050e7
refs/heads/master: 3e25f4f243db6495cf57c1fcb3a4c0311a92b203
4 changes: 2 additions & 2 deletions trunk/arch/mips/alchemy/board-mtx1.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ static void mtx1_power_off(void)

void __init board_setup(void)
{
#if IS_ENABLED(CONFIG_USB_OHCI_HCD)
#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
/* Enable USB power switch */
alchemy_gpio_direction_output(204, 0);
#endif /* IS_ENABLED(CONFIG_USB_OHCI_HCD) */
#endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */

/* Initialize sys_pinfunc */
au_writel(SYS_PF_NI2, SYS_PINFUNC);
Expand Down
10 changes: 6 additions & 4 deletions trunk/arch/mips/alchemy/common/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,13 @@ static void __init alchemy_setup_macs(int ctype)
if (alchemy_get_macs(ctype) < 1)
return;

macres = kmemdup(au1xxx_eth0_resources[ctype],
sizeof(struct resource) * MAC_RES_COUNT, GFP_KERNEL);
macres = kmalloc(sizeof(struct resource) * MAC_RES_COUNT, GFP_KERNEL);
if (!macres) {
printk(KERN_INFO "Alchemy: no memory for MAC0 resources\n");
return;
}
memcpy(macres, au1xxx_eth0_resources[ctype],
sizeof(struct resource) * MAC_RES_COUNT);
au1xxx_eth0_device.resource = macres;

i = prom_get_ethernet_addr(ethaddr);
Expand All @@ -355,12 +356,13 @@ static void __init alchemy_setup_macs(int ctype)
if (alchemy_get_macs(ctype) < 2)
return;

macres = kmemdup(au1xxx_eth1_resources[ctype],
sizeof(struct resource) * MAC_RES_COUNT, GFP_KERNEL);
macres = kmalloc(sizeof(struct resource) * MAC_RES_COUNT, GFP_KERNEL);
if (!macres) {
printk(KERN_INFO "Alchemy: no memory for MAC1 resources\n");
return;
}
memcpy(macres, au1xxx_eth1_resources[ctype],
sizeof(struct resource) * MAC_RES_COUNT);
au1xxx_eth1_device.resource = macres;

ethaddr[5] += 1; /* next addr for 2nd MAC */
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/mips/alchemy/devboards/pb1100.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void __init board_setup(void)
alchemy_gpio1_input_enable();
udelay(100);

#if IS_ENABLED(CONFIG_USB_OHCI_HCD)
#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
{
u32 pin_func, sys_freqctrl, sys_clksrc;

Expand Down Expand Up @@ -93,7 +93,7 @@ void __init board_setup(void)
pin_func |= SYS_PF_USB;
au_writel(pin_func, SYS_PINFUNC);
}
#endif /* IS_ENABLED(CONFIG_USB_OHCI_HCD) */
#endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */

/* Enable sys bus clock divider when IDLE state or no bus activity. */
au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL);
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/mips/alchemy/devboards/pb1500.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void __init board_setup(void)
alchemy_gpio_direction_input(201);
alchemy_gpio_direction_input(203);

#if IS_ENABLED(CONFIG_USB_OHCI_HCD)
#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)

/* Zero and disable FREQ2 */
sys_freqctrl = au_readl(SYS_FREQCTRL0);
Expand Down Expand Up @@ -87,7 +87,7 @@ void __init board_setup(void)
/* 2nd USB port is USB host */
pin_func |= SYS_PF_USB;
au_writel(pin_func, SYS_PINFUNC);
#endif /* IS_ENABLED(CONFIG_USB_OHCI_HCD) */
#endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */

#ifdef CONFIG_PCI
{
Expand Down
11 changes: 1 addition & 10 deletions trunk/arch/mips/alchemy/devboards/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@
#include <asm/mach-au1x00/au1000.h>
#include <prom.h>

#if defined(CONFIG_MIPS_DB1000) || \
defined(CONFIG_MIPS_PB1100) || \
defined(CONFIG_MIPS_PB1500)
#define ALCHEMY_BOARD_DEFAULT_MEMSIZE 0x04000000

#else /* Au1550/Au1200-based develboards */
#define ALCHEMY_BOARD_DEFAULT_MEMSIZE 0x08000000
#endif

void __init prom_init(void)
{
unsigned char *memsize_str;
Expand All @@ -54,7 +45,7 @@ void __init prom_init(void)
prom_init_cmdline();
memsize_str = prom_getenv("memsize");
if (!memsize_str || strict_strtoul(memsize_str, 0, &memsize))
memsize = ALCHEMY_BOARD_DEFAULT_MEMSIZE;
memsize = 64 << 20; /* all devboards have at least 64MB RAM */

add_memory_region(0, memsize, BOOT_MEM_RAM);
}
Expand Down
16 changes: 4 additions & 12 deletions trunk/arch/mips/cavium-octeon/octeon-memcpy.S
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,6 @@
.set noreorder
.set noat

/*
* t7 is used as a flag to note inatomic mode.
*/
LEAF(__copy_user_inatomic)
b __copy_user_common
li t7, 1
END(__copy_user_inatomic)

/*
* A combined memcpy/__copy_user
* __copy_user sets len to 0 for success; else to an upper bound of
Expand All @@ -182,8 +174,6 @@ LEAF(memcpy) /* a0=dst a1=src a2=len */
move v0, dst /* return value */
__memcpy:
FEXPORT(__copy_user)
li t7, 0 /* not inatomic */
__copy_user_common:
/*
* Note: dst & src may be unaligned, len may be 0
* Temps
Expand Down Expand Up @@ -422,6 +412,7 @@ l_exc_copy:
* Assumes src < THREAD_BUADDR($28)
*/
LOAD t0, TI_TASK($28)
nop
LOAD t0, THREAD_BUADDR(t0)
1:
EXC( lb t1, 0(src), l_exc)
Expand All @@ -431,9 +422,10 @@ EXC( lb t1, 0(src), l_exc)
ADD dst, dst, 1
l_exc:
LOAD t0, TI_TASK($28)
nop
LOAD t0, THREAD_BUADDR(t0) # t0 is just past last good address
nop
SUB len, AT, t0 # len number of uncopied bytes
bnez t7, 2f /* Skip the zeroing out part if inatomic */
/*
* Here's where we rely on src and dst being incremented in tandem,
* See (3) above.
Expand All @@ -451,7 +443,7 @@ l_exc:
ADD dst, dst, 1
bnez src, 1b
SUB src, src, 1
2: jr ra
jr ra
nop


Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/dec/prom/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void __init prom_free_prom_memory(void)
* the first page reserved for the exception handlers.
*/

#if IS_ENABLED(CONFIG_DECLANCE)
#if defined(CONFIG_DECLANCE) || defined(CONFIG_DECLANCE_MODULE)
/*
* Leave 128 KB reserved for Lance memory for
* IOASIC DECstations.
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/mips/include/asm/mach-loongson/loongson.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <linux/io.h>
#include <linux/init.h>
#include <linux/irq.h>
#include <linux/kconfig.h>

/* loongson internal northbridge initialization */
extern void bonito_irq_init(void);
Expand Down Expand Up @@ -67,7 +66,7 @@ extern int mach_i8259_irq(void);
#include <linux/interrupt.h>
static inline void do_perfcnt_IRQ(void)
{
#if IS_ENABLED(CONFIG_OPROFILE)
#if defined(CONFIG_OPROFILE) || defined(CONFIG_OPROFILE_MODULE)
do_IRQ(LOONGSON2_PERFCNT_IRQ);
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/include/asm/mach-tx49xx/mangle-port.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define ioswabb(a, x) (x)
#define __mem_ioswabb(a, x) (x)
#if defined(CONFIG_TOSHIBA_RBTX4939) && \
IS_ENABLED(CONFIG_SMC91X) && \
(defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)) && \
defined(__BIG_ENDIAN)
#define NEEDS_TXX9_IOSWABW
extern u16 (*ioswabw)(volatile u16 *a, u16 x);
Expand Down
13 changes: 0 additions & 13 deletions trunk/arch/mips/include/asm/mipsmtregs.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
#define read_c0_vpeconf0() __read_32bit_c0_register($1, 2)
#define write_c0_vpeconf0(val) __write_32bit_c0_register($1, 2, val)

#define read_c0_vpeconf1() __read_32bit_c0_register($1, 3)
#define write_c0_vpeconf1(val) __write_32bit_c0_register($1, 3, val)

#define read_c0_tcstatus() __read_32bit_c0_register($2, 1)
#define write_c0_tcstatus(val) __write_32bit_c0_register($2, 1, val)

Expand Down Expand Up @@ -127,14 +124,6 @@
#define VPECONF0_XTC_SHIFT 21
#define VPECONF0_XTC (_ULCAST_(0xff) << VPECONF0_XTC_SHIFT)

/* VPEConf1 fields (per VPE) */
#define VPECONF1_NCP1_SHIFT 0
#define VPECONF1_NCP1 (_ULCAST_(0xff) << VPECONF1_NCP1_SHIFT)
#define VPECONF1_NCP2_SHIFT 10
#define VPECONF1_NCP2 (_ULCAST_(0xff) << VPECONF1_NCP2_SHIFT)
#define VPECONF1_NCX_SHIFT 20
#define VPECONF1_NCX (_ULCAST_(0xff) << VPECONF1_NCX_SHIFT)

/* TCStatus fields (per TC) */
#define TCSTATUS_TASID (_ULCAST_(0xff))
#define TCSTATUS_IXMT_SHIFT 10
Expand Down Expand Up @@ -361,8 +350,6 @@ do { \
#define write_vpe_c0_vpecontrol(val) mttc0(1, 1, val)
#define read_vpe_c0_vpeconf0() mftc0(1, 2)
#define write_vpe_c0_vpeconf0(val) mttc0(1, 2, val)
#define read_vpe_c0_vpeconf1() mftc0(1, 3)
#define write_vpe_c0_vpeconf1(val) mttc0(1, 3, val)
#define read_vpe_c0_count() mftc0(9, 0)
#define write_vpe_c0_count(val) mttc0(9, 0, val)
#define read_vpe_c0_status() mftc0(12, 0)
Expand Down
6 changes: 0 additions & 6 deletions trunk/arch/mips/include/asm/smtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ typedef long asiduse;
#endif
#endif

/*
* VPE Management information
*/

#define MAX_SMTC_VPES MAX_SMTC_TLBS /* FIXME: May not always be true. */

extern asiduse smtc_live_asid[MAX_SMTC_TLBS][MAX_SMTC_ASIDS];

struct mm_struct;
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/mips/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n);
__MODULE_JAL(__copy_user) \
: "+r" (__cu_to_r), "+r" (__cu_from_r), "+r" (__cu_len_r) \
: \
: "$8", "$9", "$10", "$11", "$12", "$14", "$15", "$24", "$31", \
: "$8", "$9", "$10", "$11", "$12", "$15", "$24", "$31", \
DADDI_SCRATCH, "memory"); \
__cu_len_r; \
})
Expand Down Expand Up @@ -797,7 +797,7 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n);
".set\treorder" \
: "+r" (__cu_to_r), "+r" (__cu_from_r), "+r" (__cu_len_r) \
: \
: "$8", "$9", "$10", "$11", "$12", "$14", "$15", "$24", "$31", \
: "$8", "$9", "$10", "$11", "$12", "$15", "$24", "$31", \
DADDI_SCRATCH, "memory"); \
__cu_len_r; \
})
Expand All @@ -820,7 +820,7 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n);
".set\treorder" \
: "+r" (__cu_to_r), "+r" (__cu_from_r), "+r" (__cu_len_r) \
: \
: "$8", "$9", "$10", "$11", "$12", "$14", "$15", "$24", "$31", \
: "$8", "$9", "$10", "$11", "$12", "$15", "$24", "$31", \
DADDI_SCRATCH, "memory"); \
__cu_len_r; \
})
Expand Down
Loading

0 comments on commit 149ed3e

Please sign in to comment.