Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uboot-i9100
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
onny
uboot-i9100
Commits
1762f13b
Commit
1762f13b
authored
17 years ago
by
Jean-Christophe PLAGNIOL-VILLARD
Browse files
Options
Downloads
Patches
Plain Diff
AT91SAM9: Move CONFIG_HAS_DATAFLASH to Makefile
Signed-off-by:
Jean-Christophe PLAGNIOL-VILLARD
<
plagnioj@jcrosoft.com
>
parent
76171218
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cpu/arm926ejs/at91sam9/Makefile
+6
-3
6 additions, 3 deletions
cpu/arm926ejs/at91sam9/Makefile
cpu/arm926ejs/at91sam9/spi.c
+1
-4
1 addition, 4 deletions
cpu/arm926ejs/at91sam9/spi.c
with
7 additions
and
7 deletions
cpu/arm926ejs/at91sam9/Makefile
+
6
−
3
View file @
1762f13b
...
@@ -25,11 +25,14 @@ include $(TOPDIR)/config.mk
...
@@ -25,11 +25,14 @@ include $(TOPDIR)/config.mk
LIB
=
$(
obj
)
lib
$(
SOC
)
.a
LIB
=
$(
obj
)
lib
$(
SOC
)
.a
COBJS
=
ether.o timer.o spi.o usb.o
COBJS-y
+=
ether.o
COBJS-y
+=
timer.o
COBJS-$(CONFIG_HAS_DATAFLASH)
+=
spi.o
COBJS-y
+=
usb.o
SOBJS
=
lowlevel_init.o
SOBJS
=
lowlevel_init.o
SRCS
:=
$(
SOBJS:.o
=
.S
)
$(
COBJS:.o
=
.c
)
SRCS
:=
$(
SOBJS:.o
=
.S
)
$(
COBJS
-y
:.o
=
.c
)
OBJS
:=
$(
addprefix
$(
obj
)
,
$(
SOBJS
)
$(
COBJS
))
OBJS
:=
$(
addprefix
$(
obj
)
,
$(
SOBJS
)
$(
COBJS
-y
))
all
:
$(obj).depend $(LIB)
all
:
$(obj).depend $(LIB)
...
...
This diff is collapsed.
Click to expand it.
cpu/arm926ejs/at91sam9/spi.c
+
1
−
4
View file @
1762f13b
...
@@ -26,7 +26,6 @@
...
@@ -26,7 +26,6 @@
#include
<asm/arch/at91_pio.h>
#include
<asm/arch/at91_pio.h>
#include
<asm/arch/at91_spi.h>
#include
<asm/arch/at91_spi.h>
#ifdef CONFIG_HAS_DATAFLASH
#include
<dataflash.h>
#include
<dataflash.h>
#define AT91_SPI_PCS0_DATAFLASH_CARD 0xE
/* Chip Select 0: NPCS0%1110 */
#define AT91_SPI_PCS0_DATAFLASH_CARD 0xE
/* Chip Select 0: NPCS0%1110 */
...
@@ -85,6 +84,7 @@ void AT91F_SpiInit(void)
...
@@ -85,6 +84,7 @@ void AT91F_SpiInit(void)
void
AT91F_SpiEnable
(
int
cs
)
void
AT91F_SpiEnable
(
int
cs
)
{
{
unsigned
long
mode
;
unsigned
long
mode
;
switch
(
cs
)
{
switch
(
cs
)
{
case
0
:
/* Configure SPI CS0 for Serial DataFlash AT45DBxx */
case
0
:
/* Configure SPI CS0 for Serial DataFlash AT45DBxx */
mode
=
readl
(
AT91_BASE_SPI
+
AT91_SPI_MR
);
mode
=
readl
(
AT91_BASE_SPI
+
AT91_SPI_MR
);
...
@@ -116,12 +116,10 @@ unsigned int AT91F_SpiWrite(AT91PS_DataflashDesc pDesc)
...
@@ -116,12 +116,10 @@ unsigned int AT91F_SpiWrite(AT91PS_DataflashDesc pDesc)
{
{
unsigned
int
timeout
;
unsigned
int
timeout
;
pDesc
->
state
=
BUSY
;
pDesc
->
state
=
BUSY
;
writel
(
AT91_SPI_TXTDIS
+
AT91_SPI_RXTDIS
,
AT91_BASE_SPI
+
AT91_SPI_PTCR
);
writel
(
AT91_SPI_TXTDIS
+
AT91_SPI_RXTDIS
,
AT91_BASE_SPI
+
AT91_SPI_PTCR
);
/* Initialize the Transmit and Receive Pointer */
/* Initialize the Transmit and Receive Pointer */
writel
((
unsigned
int
)
pDesc
->
rx_cmd_pt
,
AT91_BASE_SPI
+
AT91_SPI_RPR
);
writel
((
unsigned
int
)
pDesc
->
rx_cmd_pt
,
AT91_BASE_SPI
+
AT91_SPI_RPR
);
writel
((
unsigned
int
)
pDesc
->
tx_cmd_pt
,
AT91_BASE_SPI
+
AT91_SPI_TPR
);
writel
((
unsigned
int
)
pDesc
->
tx_cmd_pt
,
AT91_BASE_SPI
+
AT91_SPI_TPR
);
...
@@ -157,4 +155,3 @@ unsigned int AT91F_SpiWrite(AT91PS_DataflashDesc pDesc)
...
@@ -157,4 +155,3 @@ unsigned int AT91F_SpiWrite(AT91PS_DataflashDesc pDesc)
return
DATAFLASH_OK
;
return
DATAFLASH_OK
;
}
}
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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