cosmetic fixes for ar7: indent, use lowercase hex notation, format

SVN-Revision: 8656
v19.07.3_mercusys_ac12_duma
Nicolas Thill 17 years ago
parent 22742b2d7e
commit 929f86c30e

@ -98,7 +98,7 @@ static struct resource cpmac_low_res[] = {
.name = "regs",
.flags = IORESOURCE_MEM,
.start = AR7_REGS_MAC0,
.end = AR7_REGS_MAC0 + 0x7FF,
.end = AR7_REGS_MAC0 + 0x7ff,
},
{
.name = "irq",
@ -113,7 +113,7 @@ static struct resource cpmac_high_res[] = {
.name = "regs",
.flags = IORESOURCE_MEM,
.start = AR7_REGS_MAC1,
.end = AR7_REGS_MAC1 + 0x7FF,
.end = AR7_REGS_MAC1 + 0x7ff,
},
{
.name = "irq",
@ -155,7 +155,7 @@ static struct resource vlynq_high_res[] = {
.name = "regs",
.flags = IORESOURCE_MEM,
.start = AR7_REGS_VLYNQ1,
.end = AR7_REGS_VLYNQ1 + 0xFF,
.end = AR7_REGS_VLYNQ1 + 0xff,
},
{
.name = "irq",

@ -225,8 +225,7 @@ static void __init console_config(void)
return;
#ifdef CONFIG_KGDB
if (!strstr(prom_getcmdline(), "nokgdb"))
{
if (!strstr(prom_getcmdline(), "nokgdb")) {
strcat(prom_getcmdline(), " console=kgdb");
kgdb_enabled = 1;
return;

@ -39,10 +39,10 @@
#define VLYNQ_CTRL_PM_ENABLE 0x80000000
#define VLYNQ_CTRL_CLOCK_INT 0x00008000
#define VLYNQ_CTRL_CLOCK_DIV(x) ((x & 7) << 16)
#define VLYNQ_CTRL_CLOCK_DIV(x) (((x) & 7) << 16)
#define VLYNQ_CTRL_INT_LOCAL 0x00004000
#define VLYNQ_CTRL_INT_ENABLE 0x00002000
#define VLYNQ_CTRL_INT_VECTOR(x) ((x & 0x1f) << 8)
#define VLYNQ_CTRL_INT_VECTOR(x) (((x) & 0x1f) << 8)
#define VLYNQ_CTRL_INT2CFG 0x00000080
#define VLYNQ_CTRL_RESET 0x00000001

@ -71,7 +71,7 @@ static struct semaphore open_semaphore;
static unsigned expect_close;
/* XXX currently fixed, allows max margin ~68.72 secs */
#define prescale_value 0xFFFF
#define prescale_value 0xffff
// Offset of the WDT registers
static unsigned long ar7_regs_wdt;
@ -96,7 +96,7 @@ static void ar7_wdt_kick(u32 value)
{
ar7_wdt->kick_lock = 0x5555;
if ((ar7_wdt->kick_lock & 3) == 1) {
ar7_wdt->kick_lock = 0xAAAA;
ar7_wdt->kick_lock = 0xaaaa;
if ((ar7_wdt->kick_lock & 3) == 3) {
ar7_wdt->kick = value;
return;
@ -107,9 +107,9 @@ static void ar7_wdt_kick(u32 value)
static void ar7_wdt_prescale(u32 value)
{
ar7_wdt->prescale_lock = 0x5A5A;
ar7_wdt->prescale_lock = 0x5a5a;
if ((ar7_wdt->prescale_lock & 3) == 1) {
ar7_wdt->prescale_lock = 0xA5A5;
ar7_wdt->prescale_lock = 0xa5a5;
if ((ar7_wdt->prescale_lock & 3) == 3) {
ar7_wdt->prescale = value;
return;
@ -122,7 +122,7 @@ static void ar7_wdt_change(u32 value)
{
ar7_wdt->change_lock = 0x6666;
if ((ar7_wdt->change_lock & 3) == 1) {
ar7_wdt->change_lock = 0xBBBB;
ar7_wdt->change_lock = 0xbbbb;
if ((ar7_wdt->change_lock & 3) == 3) {
ar7_wdt->change = value;
return;
@ -135,9 +135,9 @@ static void ar7_wdt_disable(u32 value)
{
ar7_wdt->disable_lock = 0x7777;
if ((ar7_wdt->disable_lock & 3) == 1) {
ar7_wdt->disable_lock = 0xCCCC;
ar7_wdt->disable_lock = 0xcccc;
if ((ar7_wdt->disable_lock & 3) == 2) {
ar7_wdt->disable_lock = 0xDDDD;
ar7_wdt->disable_lock = 0xdddd;
if ((ar7_wdt->disable_lock & 3) == 3) {
ar7_wdt->disable = value;
return;
@ -153,7 +153,7 @@ static void ar7_wdt_update_margin(int new_margin)
change = new_margin * (ar7_vbus_freq() / prescale_value);
if (change < 1) change = 1;
if (change > 0xFFFF) change = 0xFFFF;
if (change > 0xffff) change = 0xffff;
ar7_wdt_change(change);
margin = change * prescale_value / ar7_vbus_freq();
printk(KERN_INFO DRVNAME
@ -248,8 +248,6 @@ static int ar7_wdt_ioctl(struct inode *inode, struct file *file,
int new_margin;
switch (cmd) {
default:
return -ENOTTY;
case WDIOC_GETSUPPORT:
if(copy_to_user((struct watchdog_info *)arg, &ident,
sizeof(ident)))
@ -276,6 +274,8 @@ static int ar7_wdt_ioctl(struct inode *inode, struct file *file,
if (put_user(margin, (int *)arg))
return -EFAULT;
return 0;
default:
return -ENOTTY;
}
}

@ -33,9 +33,9 @@
#define AR7_REGS_UART0 (AR7_REGS_BASE + 0x0e00)
#define AR7_REGS_RESET (AR7_REGS_BASE + 0x1600)
#define AR7_REGS_VLYNQ0 (AR7_REGS_BASE + 0x1800)
#define AR7_REGS_DCL (AR7_REGS_BASE + 0x1A00)
#define AR7_REGS_VLYNQ1 (AR7_REGS_BASE + 0x1C00)
#define AR7_REGS_MDIO (AR7_REGS_BASE + 0x1E00)
#define AR7_REGS_DCL (AR7_REGS_BASE + 0x1a00)
#define AR7_REGS_VLYNQ1 (AR7_REGS_BASE + 0x1c00)
#define AR7_REGS_MDIO (AR7_REGS_BASE + 0x1e00)
#define AR7_REGS_IRQ (AR7_REGS_BASE + 0x2400)
#define AR7_REGS_MAC1 (AR7_REGS_BASE + 0x2800)
@ -56,7 +56,7 @@
#define AR7_GPIO_INPUT 0x0
#define AR7_GPIO_OUTPUT 0x4
#define AR7_GPIO_DIR 0x8
#define AR7_GPIO_ENABLE 0xC
#define AR7_GPIO_ENABLE 0xc
#define AR7_CHIP_7100 0x18
#define AR7_CHIP_7200 0x2b

@ -7,13 +7,15 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
DROP_SECTIONS := .reginfo .mdebug .comment .note .pdr .options .MIPS.options
OBJCOPY_SREC := $(TARGET_CROSS)objcopy -S -O srec $(addprefix --remove-section=,$(DROP_SECTIONS))
DROP_SECTIONS:=.reginfo .mdebug .comment .note .pdr .options .MIPS.options
OBJCOPY_SREC:=$(TARGET_CROSS)objcopy -S -O srec $(addprefix --remove-section=,$(DROP_SECTIONS))
LOADADDR := 0x94600000
KERNEL_ENTRY := 0x94100000
RAMSTART := 0x94000000
RAMSIZE := 0x00100000
LOADADDR:=0x94600000
KERNEL_ENTRY:=0x94100000
RAMSTART:=0x94000000
RAMSIZE:=0x00100000
EVA_LOADADDR := 0x94100000
LOADER_MAKEOPTS= \
KDIR=$(KDIR) \

Loading…
Cancel
Save