Commit 4d1da8c2 authored by Alexander Clouter's avatar Alexander Clouter Committed by Ralf Baechle

MIPS: AR7: Whitespace hacking

[Ralf: Fixed up reject and Wu's complaints about comment style.]
Signed-off-by: default avatarAlexander Clouter <alex@digriz.org.uk>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/921/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 10229f37
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
#include <asm/mach-ar7/gpio.h> #include <asm/mach-ar7/gpio.h>
struct ar7_gpio_chip { struct ar7_gpio_chip {
void __iomem *regs; void __iomem *regs;
struct gpio_chip chip; struct gpio_chip chip;
}; };
static int ar7_gpio_get_value(struct gpio_chip *chip, unsigned gpio) static int ar7_gpio_get_value(struct gpio_chip *chip, unsigned gpio)
...@@ -77,7 +77,7 @@ static int ar7_gpio_direction_output(struct gpio_chip *chip, ...@@ -77,7 +77,7 @@ static int ar7_gpio_direction_output(struct gpio_chip *chip,
static struct ar7_gpio_chip ar7_gpio_chip = { static struct ar7_gpio_chip ar7_gpio_chip = {
.chip = { .chip = {
.label = "ar7-gpio", .label = "ar7-gpio",
.direction_input = ar7_gpio_direction_input, .direction_input = ar7_gpio_direction_input,
.direction_output = ar7_gpio_direction_output, .direction_output = ar7_gpio_direction_output,
.set = ar7_gpio_set_value, .set = ar7_gpio_set_value,
......
...@@ -62,8 +62,7 @@ void __init prom_meminit(void) ...@@ -62,8 +62,7 @@ void __init prom_meminit(void)
unsigned long pages; unsigned long pages;
pages = memsize() >> PAGE_SHIFT; pages = memsize() >> PAGE_SHIFT;
add_memory_region(PHYS_OFFSET, pages << PAGE_SHIFT, add_memory_region(PHYS_OFFSET, pages << PAGE_SHIFT, BOOT_MEM_RAM);
BOOT_MEM_RAM);
} }
void __init prom_free_prom_memory(void) void __init prom_free_prom_memory(void)
......
This diff is collapsed.
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
#define MAX_ENTRY 80 #define MAX_ENTRY 80
struct env_var { struct env_var {
char *name; char *name;
char *value; char *value;
}; };
static struct env_var adam2_env[MAX_ENTRY]; static struct env_var adam2_env[MAX_ENTRY];
...@@ -41,6 +41,7 @@ static struct env_var adam2_env[MAX_ENTRY]; ...@@ -41,6 +41,7 @@ static struct env_var adam2_env[MAX_ENTRY];
char *prom_getenv(const char *name) char *prom_getenv(const char *name)
{ {
int i; int i;
for (i = 0; (i < MAX_ENTRY) && adam2_env[i].name; i++) for (i = 0; (i < MAX_ENTRY) && adam2_env[i].name; i++)
if (!strcmp(name, adam2_env[i].name)) if (!strcmp(name, adam2_env[i].name))
return adam2_env[i].value; return adam2_env[i].value;
...@@ -61,38 +62,38 @@ static void __init ar7_init_cmdline(int argc, char *argv[]) ...@@ -61,38 +62,38 @@ static void __init ar7_init_cmdline(int argc, char *argv[])
} }
struct psbl_rec { struct psbl_rec {
u32 psbl_size; u32 psbl_size;
u32 env_base; u32 env_base;
u32 env_size; u32 env_size;
u32 ffs_base; u32 ffs_base;
u32 ffs_size; u32 ffs_size;
}; };
static __initdata char psp_env_version[] = "TIENV0.8"; static __initdata char psp_env_version[] = "TIENV0.8";
struct psp_env_chunk { struct psp_env_chunk {
u8 num; u8 num;
u8 ctrl; u8 ctrl;
u16 csum; u16 csum;
u8 len; u8 len;
char data[11]; char data[11];
} __attribute__ ((packed)); } __attribute__ ((packed));
struct psp_var_map_entry { struct psp_var_map_entry {
u8 num; u8 num;
char *value; char *value;
}; };
static struct psp_var_map_entry psp_var_map[] = { static struct psp_var_map_entry psp_var_map[] = {
{ 1, "cpufrequency" }, { 1, "cpufrequency" },
{ 2, "memsize" }, { 2, "memsize" },
{ 3, "flashsize" }, { 3, "flashsize" },
{ 4, "modetty0" }, { 4, "modetty0" },
{ 5, "modetty1" }, { 5, "modetty1" },
{ 8, "maca" }, { 8, "maca" },
{ 9, "macb" }, { 9, "macb" },
{ 28, "sysfrequency" }, { 28, "sysfrequency" },
{ 38, "mipsfrequency" }, { 38, "mipsfrequency" },
}; };
/* /*
...@@ -139,6 +140,7 @@ static char * __init lookup_psp_var_map(u8 num) ...@@ -139,6 +140,7 @@ static char * __init lookup_psp_var_map(u8 num)
static void __init add_adam2_var(char *name, char *value) static void __init add_adam2_var(char *name, char *value)
{ {
int i; int i;
for (i = 0; i < MAX_ENTRY; i++) { for (i = 0; i < MAX_ENTRY; i++) {
if (!adam2_env[i].name) { if (!adam2_env[i].name) {
adam2_env[i].name = name; adam2_env[i].name = name;
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
static void ar7_machine_restart(char *command) static void ar7_machine_restart(char *command)
{ {
u32 *softres_reg = ioremap(AR7_REGS_RESET + u32 *softres_reg = ioremap(AR7_REGS_RESET + AR7_RESET_SOFTWARE, 1);
AR7_RESET_SOFTWARE, 1);
writel(1, softres_reg); writel(1, softres_reg);
} }
...@@ -41,6 +41,7 @@ static void ar7_machine_power_off(void) ...@@ -41,6 +41,7 @@ static void ar7_machine_power_off(void)
{ {
u32 *power_reg = (u32 *)ioremap(AR7_REGS_POWER, 1); u32 *power_reg = (u32 *)ioremap(AR7_REGS_POWER, 1);
u32 power_state = readl(power_reg) | (3 << 30); u32 power_state = readl(power_reg) | (3 << 30);
writel(power_state, power_reg); writel(power_state, power_reg);
ar7_machine_halt(); ar7_machine_halt();
} }
...@@ -49,14 +50,14 @@ const char *get_system_type(void) ...@@ -49,14 +50,14 @@ const char *get_system_type(void)
{ {
u16 chip_id = ar7_chip_id(); u16 chip_id = ar7_chip_id();
switch (chip_id) { switch (chip_id) {
case AR7_CHIP_7300:
return "TI AR7 (TNETD7300)";
case AR7_CHIP_7100: case AR7_CHIP_7100:
return "TI AR7 (TNETD7100)"; return "TI AR7 (TNETD7100)";
case AR7_CHIP_7200: case AR7_CHIP_7200:
return "TI AR7 (TNETD7200)"; return "TI AR7 (TNETD7200)";
case AR7_CHIP_7300:
return "TI AR7 (TNETD7300)";
default: default:
return "TI AR7 (Unknown)"; return "TI AR7 (unknown)";
} }
} }
...@@ -70,7 +71,6 @@ console_initcall(ar7_init_console); ...@@ -70,7 +71,6 @@ console_initcall(ar7_init_console);
* Initializes basic routines and structures pointers, memory size (as * Initializes basic routines and structures pointers, memory size (as
* given by the bios and saves the command line. * given by the bios and saves the command line.
*/ */
void __init plat_mem_setup(void) void __init plat_mem_setup(void)
{ {
unsigned long io_base; unsigned long io_base;
...@@ -88,6 +88,5 @@ void __init plat_mem_setup(void) ...@@ -88,6 +88,5 @@ void __init plat_mem_setup(void)
prom_meminit(); prom_meminit();
printk(KERN_INFO "%s, ID: 0x%04x, Revision: 0x%02x\n", printk(KERN_INFO "%s, ID: 0x%04x, Revision: 0x%02x\n",
get_system_type(), get_system_type(), ar7_chip_id(), ar7_chip_rev());
ar7_chip_id(), ar7_chip_rev());
} }
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