Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
0bc202e0
Commit
0bc202e0
authored
May 24, 2008
by
David Woodhouse
Committed by
David Woodhouse
Jul 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aic94xx: treat firmware data as const
Signed-off-by:
David Woodhouse
<
dwmw2@infradead.org
>
parent
3b216d18
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
drivers/scsi/aic94xx/aic94xx_sds.c
drivers/scsi/aic94xx/aic94xx_sds.c
+6
-6
drivers/scsi/aic94xx/aic94xx_sds.h
drivers/scsi/aic94xx/aic94xx_sds.h
+2
-2
drivers/scsi/aic94xx/aic94xx_seq.c
drivers/scsi/aic94xx/aic94xx_seq.c
+4
-3
No files found.
drivers/scsi/aic94xx/aic94xx_sds.c
View file @
0bc202e0
...
...
@@ -1093,9 +1093,9 @@ out:
* @bytes_to_verify: total bytes to verify
*/
int
asd_verify_flash_seg
(
struct
asd_ha_struct
*
asd_ha
,
void
*
src
,
u32
dest_offset
,
u32
bytes_to_verify
)
const
void
*
src
,
u32
dest_offset
,
u32
bytes_to_verify
)
{
u8
*
src_buf
;
const
u8
*
src_buf
;
u8
flash_char
;
int
err
;
u32
nv_offset
,
reg
,
i
;
...
...
@@ -1105,7 +1105,7 @@ int asd_verify_flash_seg(struct asd_ha_struct *asd_ha,
err
=
FLASH_OK
;
nv_offset
=
dest_offset
;
src_buf
=
(
u8
*
)
src
;
src_buf
=
(
const
u8
*
)
src
;
for
(
i
=
0
;
i
<
bytes_to_verify
;
i
++
)
{
flash_char
=
asd_read_reg_byte
(
asd_ha
,
reg
+
nv_offset
+
i
);
if
(
flash_char
!=
src_buf
[
i
])
{
...
...
@@ -1124,9 +1124,9 @@ int asd_verify_flash_seg(struct asd_ha_struct *asd_ha,
* @bytes_to_write: total bytes to write
*/
int
asd_write_flash_seg
(
struct
asd_ha_struct
*
asd_ha
,
void
*
src
,
u32
dest_offset
,
u32
bytes_to_write
)
const
void
*
src
,
u32
dest_offset
,
u32
bytes_to_write
)
{
u8
*
src_buf
;
const
u8
*
src_buf
;
u32
nv_offset
,
reg
,
i
;
int
err
;
...
...
@@ -1153,7 +1153,7 @@ int asd_write_flash_seg(struct asd_ha_struct *asd_ha,
return
err
;
}
src_buf
=
(
u8
*
)
src
;
src_buf
=
(
const
u8
*
)
src
;
for
(
i
=
0
;
i
<
bytes_to_write
;
i
++
)
{
/* Setup program command sequence */
switch
(
asd_ha
->
hw_prof
.
flash
.
method
)
{
...
...
drivers/scsi/aic94xx/aic94xx_sds.h
View file @
0bc202e0
...
...
@@ -110,9 +110,9 @@ struct bios_file_header {
};
int
asd_verify_flash_seg
(
struct
asd_ha_struct
*
asd_ha
,
void
*
src
,
u32
dest_offset
,
u32
bytes_to_verify
);
const
void
*
src
,
u32
dest_offset
,
u32
bytes_to_verify
);
int
asd_write_flash_seg
(
struct
asd_ha_struct
*
asd_ha
,
void
*
src
,
u32
dest_offset
,
u32
bytes_to_write
);
const
void
*
src
,
u32
dest_offset
,
u32
bytes_to_write
);
int
asd_chk_write_status
(
struct
asd_ha_struct
*
asd_ha
,
u32
sector_addr
,
u8
erase_flag
);
int
asd_check_flash_type
(
struct
asd_ha_struct
*
asd_ha
);
...
...
drivers/scsi/aic94xx/aic94xx_seq.c
View file @
0bc202e0
...
...
@@ -46,7 +46,7 @@
static
const
struct
firmware
*
sequencer_fw
;
static
u16
cseq_vecs
[
CSEQ_NUM_VECS
],
lseq_vecs
[
LSEQ_NUM_VECS
],
mode2_task
,
cseq_idle_loop
,
lseq_idle_loop
;
static
u8
*
cseq_code
,
*
lseq_code
;
static
const
u8
*
cseq_code
,
*
lseq_code
;
static
u32
cseq_code_size
,
lseq_code_size
;
static
u16
first_scb_site_no
=
0xFFFF
;
...
...
@@ -1235,7 +1235,8 @@ int asd_release_firmware(void)
static
int
asd_request_firmware
(
struct
asd_ha_struct
*
asd_ha
)
{
int
err
,
i
;
struct
sequencer_file_header
header
,
*
hdr_ptr
;
struct
sequencer_file_header
header
;
const
struct
sequencer_file_header
*
hdr_ptr
;
u32
csum
=
0
;
u16
*
ptr_cseq_vecs
,
*
ptr_lseq_vecs
;
...
...
@@ -1249,7 +1250,7 @@ static int asd_request_firmware(struct asd_ha_struct *asd_ha)
if
(
err
)
return
err
;
hdr_ptr
=
(
struct
sequencer_file_header
*
)
sequencer_fw
->
data
;
hdr_ptr
=
(
const
struct
sequencer_file_header
*
)
sequencer_fw
->
data
;
header
.
csum
=
le32_to_cpu
(
hdr_ptr
->
csum
);
header
.
major
=
le32_to_cpu
(
hdr_ptr
->
major
);
...
...
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