Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple PCIe FMC carrier SPEC - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Simple PCIe FMC carrier SPEC - Software
Commits
3dfdab04
Commit
3dfdab04
authored
Jul 24, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spec-i2c: use sysc registers, remove FD registers
parent
5dd25dcc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
480 deletions
+8
-480
fd_main_regs.h
kernel/hw/fd_main_regs.h
+0
-468
spec-i2c.c
kernel/spec-i2c.c
+8
-12
No files found.
kernel/hw/fd_main_regs.h
deleted
100644 → 0
View file @
5dd25dcc
This diff is collapsed.
Click to expand it.
kernel/spec-i2c.c
View file @
3dfdab04
...
...
@@ -17,7 +17,7 @@
#include <linux/slab.h>
#include <linux/fmc.h>
#include "spec.h"
#include "hw/
fd_mai
n_regs.h"
#include "hw/
wrc_sysco
n_regs.h"
static
int
spec_i2c_dump
;
...
...
@@ -45,27 +45,23 @@ static void dumpstruct(char *name, void *ptr, int size)
static
void
set_sda
(
struct
fmc_device
*
fmc
,
int
val
)
{
uint32_t
reg
;
reg
=
fmc_readl
(
fmc
,
FD_REG_I2CR
)
&
~
FD_I2CR_SDA_OUT
;
if
(
val
)
reg
|=
FD_I2CR_SDA_OUT
;
fmc_writel
(
fmc
,
reg
,
FD_REG_I2CR
);
fmc_writel
(
fmc
,
SYSC_GPSR_FMC_SDA
,
SYSC_REG_GPSR
);
else
fmc_writel
(
fmc
,
SYSC_GPCR_FMC_SDA
,
SYSC_REG_GPCR
);
}
static
void
set_scl
(
struct
fmc_device
*
fmc
,
int
val
)
{
uint32_t
reg
;
reg
=
fmc_readl
(
fmc
,
FD_REG_I2CR
)
&
~
FD_I2CR_SCL_OUT
;
if
(
val
)
reg
|=
FD_I2CR_SCL_OUT
;
fmc_writel
(
fmc
,
reg
,
FD_REG_I2CR
);
fmc_writel
(
fmc
,
SYSC_GPSR_FMC_SCL
,
SYSC_REG_GPSR
);
else
fmc_writel
(
fmc
,
SYSC_GPCR_FMC_SCL
,
SYSC_REG_GPCR
);
}
static
int
get_sda
(
struct
fmc_device
*
fmc
)
{
return
fmc_readl
(
fmc
,
FD_REG_I2CR
)
&
FD_I2CR_SDA_IN
?
1
:
0
;
return
fmc_readl
(
fmc
,
SYSC_REG_GPSR
)
&
SYSC_GPSR_FMC_SDA
?
1
:
0
;
};
static
void
mi2c_start
(
struct
fmc_device
*
fmc
)
...
...
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