Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
26d5aa5a
Commit
26d5aa5a
authored
Feb 27, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://bk.arm.linux.org.uk/linux-2.6-rmk
into ppc970.osdl.org:/home/torvalds/v2.5/linux
parents
a8a6ec60
585abe04
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
13 deletions
+54
-13
drivers/mtd/afs.c
drivers/mtd/afs.c
+45
-5
drivers/mtd/maps/integrator-flash.c
drivers/mtd/maps/integrator-flash.c
+4
-3
drivers/mtd/maps/lubbock-flash.c
drivers/mtd/maps/lubbock-flash.c
+3
-3
drivers/usb/host/ohci-sa1111.c
drivers/usb/host/ohci-sa1111.c
+2
-2
No files found.
drivers/mtd/afs.c
View file @
26d5aa5a
...
...
@@ -57,6 +57,17 @@ struct image_info_struct {
u32
checksum
;
/* Image checksum (inc. this struct) */
};
static
u32
word_sum
(
void
*
words
,
int
num
)
{
u32
*
p
=
words
;
u32
sum
=
0
;
while
(
num
--
)
sum
+=
*
p
++
;
return
sum
;
}
static
int
afs_read_footer
(
struct
mtd_info
*
mtd
,
u_int
*
img_start
,
u_int
*
iis_start
,
u_int
off
,
u_int
mask
)
...
...
@@ -84,6 +95,12 @@ afs_read_footer(struct mtd_info *mtd, u_int *img_start, u_int *iis_start,
if
(
fs
.
signature
!=
0xa0ffff9f
)
ret
=
0
;
/*
* Check the checksum.
*/
if
(
word_sum
(
&
fs
,
sizeof
(
fs
)
/
sizeof
(
u32
))
!=
0xffffffff
)
ret
=
0
;
/*
* Don't touch the SIB.
*/
...
...
@@ -114,16 +131,35 @@ static int
afs_read_iis
(
struct
mtd_info
*
mtd
,
struct
image_info_struct
*
iis
,
u_int
ptr
)
{
size_t
sz
;
int
ret
;
int
ret
,
i
;
memset
(
iis
,
0
,
sizeof
(
*
iis
));
ret
=
mtd
->
read
(
mtd
,
ptr
,
sizeof
(
*
iis
),
&
sz
,
(
u_char
*
)
iis
);
if
(
ret
>=
0
&&
sz
!=
sizeof
(
*
iis
))
ret
=
-
EINVAL
;
if
(
ret
<
0
)
printk
(
KERN_ERR
"AFS: mtd read failed at 0x%x: %d
\n
"
,
ptr
,
ret
);
goto
failed
;
if
(
sz
!=
sizeof
(
*
iis
))
{
ret
=
-
EINVAL
;
goto
failed
;
}
ret
=
0
;
/*
* Validate the name - it must be NUL terminated.
*/
for
(
i
=
0
;
i
<
sizeof
(
iis
->
name
);
i
++
)
if
(
iis
->
name
[
i
]
==
'\0'
)
break
;
if
(
i
<
sizeof
(
iis
->
name
))
ret
=
1
;
return
ret
;
failed:
printk
(
KERN_ERR
"AFS: mtd read failed at 0x%x: %d
\n
"
,
ptr
,
ret
);
return
ret
;
}
...
...
@@ -160,6 +196,8 @@ static int parse_afs_partitions(struct mtd_info *mtd,
ret
=
afs_read_iis
(
mtd
,
&
iis
,
iis_ptr
);
if
(
ret
<
0
)
break
;
if
(
ret
==
0
)
continue
;
sz
+=
sizeof
(
struct
mtd_partition
);
sz
+=
strlen
(
iis
.
name
)
+
1
;
...
...
@@ -194,6 +232,8 @@ static int parse_afs_partitions(struct mtd_info *mtd,
ret
=
afs_read_iis
(
mtd
,
&
iis
,
iis_ptr
);
if
(
ret
<
0
)
break
;
if
(
ret
==
0
)
continue
;
strcpy
(
str
,
iis
.
name
);
size
=
mtd
->
erasesize
+
off
-
img_ptr
;
...
...
drivers/mtd/maps/integrator-flash.c
View file @
26d5aa5a
/*======================================================================
drivers/mtd/maps/
armflash.c: ARM Flash Layout/Partitioning
drivers/mtd/maps/
integrator-flash.c: ARM Integrator flash map driver
Copyright (C) 2000 ARM Limited
Copyright (C) 2003 Deep Blue Solutions Ltd.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -21,7 +22,7 @@
This is access code for flashes using ARM's flash partitioning
standards.
$Id: integrator-flash.c,v 1.1
2 2003/05/20 20:59:30 dwmw2
Exp $
$Id: integrator-flash.c,v 1.1
5 2004/02/27 22:37:39 rmk
Exp $
======================================================================*/
...
...
@@ -64,7 +65,7 @@ static void armflash_set_vpp(struct map_info *map, int on)
info
->
plat
->
set_vpp
(
on
);
}
static
const
char
*
probes
[]
=
{
"RedBoot"
,
"afs"
,
NULL
};
static
const
char
*
probes
[]
=
{
"
cmdlinepart"
,
"
RedBoot"
,
"afs"
,
NULL
};
static
int
armflash_probe
(
struct
device
*
_dev
)
{
...
...
drivers/mtd/maps/lubbock-flash.c
View file @
26d5aa5a
...
...
@@ -74,7 +74,7 @@ static int __init init_lubbock(void)
lubbock_maps
[
flashboot
].
name
=
"Lubbock Boot ROM"
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
lubbock_maps
[
i
].
virt
=
(
unsigned
long
)
__ioremap
(
lubbock_maps
[
i
].
phys
,
WINDOW_SIZE
,
0
);
lubbock_maps
[
i
].
virt
=
(
unsigned
long
)
ioremap
(
lubbock_maps
[
i
].
phys
,
WINDOW_SIZE
);
if
(
!
lubbock_maps
[
i
].
virt
)
{
printk
(
KERN_WARNING
"Failed to ioremap %s
\n
"
,
lubbock_maps
[
i
].
name
);
if
(
!
ret
)
...
...
@@ -97,8 +97,8 @@ static int __init init_lubbock(void)
}
mymtds
[
i
]
->
owner
=
THIS_MODULE
;
int
ret
=
parse_mtd_partitions
(
mymtds
[
i
],
probes
,
&
parsed_parts
[
i
],
0
);
ret
=
parse_mtd_partitions
(
mymtds
[
i
],
probes
,
&
parsed_parts
[
i
],
0
);
if
(
ret
>
0
)
nr_parsed_parts
[
i
]
=
ret
;
...
...
drivers/usb/host/ohci-sa1111.c
View file @
26d5aa5a
...
...
@@ -105,7 +105,7 @@ static void dump_hci_status(struct usb_hcd *hcd, const char *label)
}
#endif
static
void
usb_hcd_sa1111_hcim_irq
(
int
irq
,
void
*
__hcd
,
struct
pt_regs
*
r
)
static
irqreturn_t
usb_hcd_sa1111_hcim_irq
(
int
irq
,
void
*
__hcd
,
struct
pt_regs
*
r
)
{
struct
usb_hcd
*
hcd
=
__hcd
;
// unsigned long status = sa1111_readl(hcd->regs + SA1111_USB_STATUS);
...
...
@@ -120,7 +120,7 @@ static void usb_hcd_sa1111_hcim_irq (int irq, void *__hcd, struct pt_regs * r)
}
#endif
usb_hcd_irq
(
irq
,
hcd
,
r
);
return
usb_hcd_irq
(
irq
,
hcd
,
r
);
}
/*-------------------------------------------------------------------------*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment