git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
powerpc
/
platforms
/
powermac
/
feature.c
diff --git
a/arch/powerpc/platforms/powermac/feature.c
b/arch/powerpc/platforms/powermac/feature.c
index
f8313bf
..
c29a6a0
100644
(file)
--- a/
arch/powerpc/platforms/powermac/feature.c
+++ b/
arch/powerpc/platforms/powermac/feature.c
@@
-486,10
+486,6
@@
static long heathrow_sound_enable(struct device_node *node, long param,
static u32 save_fcr[6];
static u32 save_mbcr;
static u32 save_fcr[6];
static u32 save_mbcr;
-static u32 save_gpio_levels[2];
-static u8 save_gpio_extint[KEYLARGO_GPIO_EXTINT_CNT];
-static u8 save_gpio_normal[KEYLARGO_GPIO_CNT];
-static u32 save_unin_clock_ctl;
static struct dbdma_regs save_dbdma[13];
static struct dbdma_regs save_alt_dbdma[13];
static struct dbdma_regs save_dbdma[13];
static struct dbdma_regs save_alt_dbdma[13];
@@
-1058,8
+1054,8
@@
core99_reset_cpu(struct device_node *node, long param, long value)
if (np == NULL)
return -ENODEV;
for (np = np->child; np != NULL; np = np->sibling) {
if (np == NULL)
return -ENODEV;
for (np = np->child; np != NULL; np = np->sibling) {
-
u32 *num = (u32 *)
get_property(np, "reg", NULL);
-
u32 *rst = (u32 *)
get_property(np, "soft-reset", NULL);
+
const u32 *num =
get_property(np, "reg", NULL);
+
const u32 *rst =
get_property(np, "soft-reset", NULL);
if (num == NULL || rst == NULL)
continue;
if (param == *num) {
if (num == NULL || rst == NULL)
continue;
if (param == *num) {
@@
-1087,7
+1083,7
@@
core99_usb_enable(struct device_node *node, long param, long value)
{
struct macio_chip *macio;
unsigned long flags;
{
struct macio_chip *macio;
unsigned long flags;
- char *prop;
+ c
onst c
har *prop;
int number;
u32 reg;
int number;
u32 reg;
@@
-1096,7
+1092,7
@@
core99_usb_enable(struct device_node *node, long param, long value)
macio->type != macio_intrepid)
return -ENODEV;
macio->type != macio_intrepid)
return -ENODEV;
- prop =
(char *)
get_property(node, "AAPL,clock-id", NULL);
+ prop = get_property(node, "AAPL,clock-id", NULL);
if (!prop)
return -ENODEV;
if (strncmp(prop, "usb0u048", 8) == 0)
if (!prop)
return -ENODEV;
if (strncmp(prop, "usb0u048", 8) == 0)
@@
-1507,8
+1503,8
@@
static long g5_reset_cpu(struct device_node *node, long param, long value)
if (np == NULL)
return -ENODEV;
for (np = np->child; np != NULL; np = np->sibling) {
if (np == NULL)
return -ENODEV;
for (np = np->child; np != NULL; np = np->sibling) {
-
u32 *num = (u32 *)
get_property(np, "reg", NULL);
-
u32 *rst = (u32 *)
get_property(np, "soft-reset", NULL);
+
const u32 *num =
get_property(np, "reg", NULL);
+
const u32 *rst =
get_property(np, "soft-reset", NULL);
if (num == NULL || rst == NULL)
continue;
if (param == *num) {
if (num == NULL || rst == NULL)
continue;
if (param == *num) {
@@
-1548,6
+1544,10
@@
void g5_phy_disable_cpu1(void)
#ifdef CONFIG_PM
#ifdef CONFIG_PM
+static u32 save_gpio_levels[2];
+static u8 save_gpio_extint[KEYLARGO_GPIO_EXTINT_CNT];
+static u8 save_gpio_normal[KEYLARGO_GPIO_CNT];
+static u32 save_unin_clock_ctl;
static void keylargo_shutdown(struct macio_chip *macio, int sleep_mode)
{
static void keylargo_shutdown(struct macio_chip *macio, int sleep_mode)
{
@@
-2408,7
+2408,7
@@
static int __init probe_motherboard(void)
*/
dt = find_devices("device-tree");
if (dt != NULL)
*/
dt = find_devices("device-tree");
if (dt != NULL)
- model =
(const char *)
get_property(dt, "model", NULL);
+ model = get_property(dt, "model", NULL);
for(i=0; model && i<(sizeof(pmac_mb_defs)/sizeof(struct pmac_mb_def)); i++) {
if (strcmp(model, pmac_mb_defs[i].model_string) == 0) {
pmac_mb = pmac_mb_defs[i];
for(i=0; model && i<(sizeof(pmac_mb_defs)/sizeof(struct pmac_mb_def)); i++) {
if (strcmp(model, pmac_mb_defs[i].model_string) == 0) {
pmac_mb = pmac_mb_defs[i];
@@
-2536,7
+2536,7
@@
found:
*/
static void __init probe_uninorth(void)
{
*/
static void __init probe_uninorth(void)
{
- u32 *addrp;
+
const
u32 *addrp;
phys_addr_t address;
unsigned long actrl;
phys_addr_t address;
unsigned long actrl;
@@
-2555,7
+2555,7
@@
static void __init probe_uninorth(void)
if (uninorth_node == NULL)
return;
if (uninorth_node == NULL)
return;
- addrp =
(u32 *)
get_property(uninorth_node, "reg", NULL);
+ addrp = get_property(uninorth_node, "reg", NULL);
if (addrp == NULL)
return;
address = of_translate_address(uninorth_node, addrp);
if (addrp == NULL)
return;
address = of_translate_address(uninorth_node, addrp);
@@
-2596,7
+2596,7
@@
static void __init probe_one_macio(const char *name, const char *compat, int typ
struct device_node* node;
int i;
volatile u32 __iomem *base;
struct device_node* node;
int i;
volatile u32 __iomem *base;
-
u32
*addrp, *revp;
+
const u32
*addrp, *revp;
phys_addr_t addr;
u64 size;
phys_addr_t addr;
u64 size;
@@
-2639,7
+2639,7
@@
static void __init probe_one_macio(const char *name, const char *compat, int typ
return;
}
if (type == macio_keylargo || type == macio_keylargo2) {
return;
}
if (type == macio_keylargo || type == macio_keylargo2) {
-
u32 *did = (u32 *)
get_property(node, "device-id", NULL);
+
const u32 *did =
get_property(node, "device-id", NULL);
if (*did == 0x00000025)
type = macio_pangea;
if (*did == 0x0000003e)
if (*did == 0x00000025)
type = macio_pangea;
if (*did == 0x0000003e)
@@
-2652,7
+2652,7
@@
static void __init probe_one_macio(const char *name, const char *compat, int typ
macio_chips[i].base = base;
macio_chips[i].flags = MACIO_FLAG_SCCB_ON | MACIO_FLAG_SCCB_ON;
macio_chips[i].name = macio_names[type];
macio_chips[i].base = base;
macio_chips[i].flags = MACIO_FLAG_SCCB_ON | MACIO_FLAG_SCCB_ON;
macio_chips[i].name = macio_names[type];
- revp =
(u32 *)
get_property(node, "revision-id", NULL);
+ revp = get_property(node, "revision-id", NULL);
if (revp)
macio_chips[i].rev = *revp;
printk(KERN_INFO "Found a %s mac-io controller, rev: %d, mapped at 0x%p\n",
if (revp)
macio_chips[i].rev = *revp;
printk(KERN_INFO "Found a %s mac-io controller, rev: %d, mapped at 0x%p\n",
@@
-2695,15
+2695,15
@@
static void __init
initial_serial_shutdown(struct device_node *np)
{
int len;
initial_serial_shutdown(struct device_node *np)
{
int len;
- struct slot_names_prop {
+
const
struct slot_names_prop {
int count;
char name[1];
} *slots;
int count;
char name[1];
} *slots;
- char *conn;
+ c
onst c
har *conn;
int port_type = PMAC_SCC_ASYNC;
int modem = 0;
int port_type = PMAC_SCC_ASYNC;
int modem = 0;
- slots =
(struct slot_names_prop *)
get_property(np, "slot-names", &len);
+ slots = get_property(np, "slot-names", &len);
conn = get_property(np, "AAPL,connector", &len);
if (conn && (strcmp(conn, "infrared") == 0))
port_type = PMAC_SCC_IRDA;
conn = get_property(np, "AAPL,connector", &len);
if (conn && (strcmp(conn, "infrared") == 0))
port_type = PMAC_SCC_IRDA;