Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spec-sw
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
fmc-projects
spec
spec-sw
Commits
630dac08
There was an error fetching the commit references. Please try again later.
Commit
630dac08
authored
12 years ago
by
Alessandro Rubini
Browse files
Options
Downloads
Patches
Plain Diff
spec-fmc: added eeprom methods
parent
bffa2762
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kernel/spec-fmc.c
+14
-1
14 additions, 1 deletion
kernel/spec-fmc.c
with
14 additions
and
1 deletion
kernel/spec-fmc.c
+
14
−
1
View file @
630dac08
...
@@ -72,13 +72,25 @@ static int spec_irq_free(struct fmc_device *fmc)
...
@@ -72,13 +72,25 @@ static int spec_irq_free(struct fmc_device *fmc)
return
0
;
return
0
;
}
}
/* The engines for this live in spec-i2c.c, we only shape arguments */
static
int
spec_read_ee
(
struct
fmc_device
*
fmc
,
int
pos
,
void
*
data
,
int
len
)
{
return
spec_eeprom_read
(
fmc
,
SPEC_I2C_EEPROM_ADDR
,
pos
,
data
,
len
);
}
static
int
spec_write_ee
(
struct
fmc_device
*
fmc
,
int
pos
,
void
*
data
,
int
len
)
{
return
spec_eeprom_write
(
fmc
,
SPEC_I2C_EEPROM_ADDR
,
pos
,
data
,
len
);
}
static
struct
fmc_operations
spec_fmc_operations
=
{
static
struct
fmc_operations
spec_fmc_operations
=
{
/* no readl/writel because we have the base pointer */
/* no readl/writel because we have the base pointer */
/* FIXME: reprogram */
/* FIXME: reprogram */
.
irq_request
=
spec_irq_request
,
.
irq_request
=
spec_irq_request
,
.
irq_ack
=
spec_irq_ack
,
.
irq_ack
=
spec_irq_ack
,
.
irq_free
=
spec_irq_free
,
.
irq_free
=
spec_irq_free
,
/* FIXME: eeprom */
.
read_ee
=
spec_read_ee
,
.
write_ee
=
spec_write_ee
,
};
};
/*
/*
...
@@ -199,6 +211,7 @@ int spec_fmc_create(struct spec_dev *spec)
...
@@ -199,6 +211,7 @@ int spec_fmc_create(struct spec_dev *spec)
fmc
->
base
=
spec
->
remap
[
0
]
+
0x80000
;
/* 512k window at 512k offset */
fmc
->
base
=
spec
->
remap
[
0
]
+
0x80000
;
/* 512k window at 512k offset */
fmc
->
irq
=
spec
->
pdev
->
irq
;
fmc
->
irq
=
spec
->
pdev
->
irq
;
fmc
->
op
=
&
spec_fmc_operations
;
fmc
->
op
=
&
spec_fmc_operations
;
fmc
->
hwdev
=
&
spec
->
pdev
->
dev
;
/* for messages */
spec
->
fmc
=
fmc
;
spec
->
fmc
=
fmc
;
/* Check that the golden binary is actually correct */
/* Check that the golden binary is actually correct */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment