File tree Expand file tree Collapse file tree 12 files changed +5762
-87
lines changed Expand file tree Collapse file tree 12 files changed +5762
-87
lines changed Original file line number Diff line number Diff line change @@ -206,3 +206,8 @@ void SDL_Interrupt_Handler() {
206
206
USPiInterruptHandler ();
207
207
#endif
208
208
}
209
+
210
+ void log_printf (const char * ptr , ...)
211
+ {
212
+ // Do nothing
213
+ }
Original file line number Diff line number Diff line change 6
6
console.o \
7
7
emmc.o \
8
8
fb.o \
9
+ ff.o \
9
10
platform.o \
10
11
wiring.o
11
12
Original file line number Diff line number Diff line change @@ -11,12 +11,12 @@ OBJCOPY := $(TOOLCHAIN)-objcopy
11
11
DEPDIR := .deps
12
12
13
13
ASFLAGS = --warn -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=softfp
14
- CFLAGS = -Wall -O2 -ffreestanding -marm -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=softfp -D__RASPBERRY_PI__ -I../kernel
14
+ CFLAGS = -Wall -O2 -ffreestanding -marm -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=softfp -D__RASPBERRY_PI__ -I../kernel -I../uspi/include
15
15
CPPFLAGS = $(CFLAGS ) -fno-exceptions -fno-unwind-tables -fno-rtti
16
16
LDFLAGS = -T ../kernel/raspberry.ld -nostartfiles -fno-exceptions -fno-unwind-tables -fno-rtti -Wl,-Map=kernel.map -o kernel.elf
17
17
18
- LIBS = -L../kernel -lkernel
19
- LIBS_DEP = ../kernel/libkernel.a
18
+ LIBS = -L../kernel -lkernel -L../uspi -luspi
19
+ LIBS_DEP = ../kernel/libkernel.a ../uspi/libuspi.a
20
20
21
21
% .o : % .c
22
22
@mkdir -p $(DEPDIR ) /$(@D )
Original file line number Diff line number Diff line change @@ -97,37 +97,7 @@ struct sd_scr
97
97
int sd_version ;
98
98
};
99
99
100
- struct emmc_block_dev
101
- {
102
- struct block_device bd ;
103
- uint32_t card_supports_sdhc ;
104
- uint32_t card_supports_18v ;
105
- uint32_t card_ocr ;
106
- uint32_t card_rca ;
107
- uint32_t last_interrupt ;
108
- uint32_t last_error ;
109
-
110
- struct sd_scr * scr ;
111
-
112
- int failed_voltage_switch ;
113
-
114
- uint32_t last_cmd_reg ;
115
- uint32_t last_cmd ;
116
- uint32_t last_cmd_success ;
117
- uint32_t last_r0 ;
118
- uint32_t last_r1 ;
119
- uint32_t last_r2 ;
120
- uint32_t last_r3 ;
121
-
122
- void * buf ;
123
- int blocks_to_transfer ;
124
- size_t block_size ;
125
- int use_sdma ;
126
- int card_removal ;
127
- uint32_t base_clock ;
128
- };
129
-
130
- static struct emmc_block_dev emmc_dev ;
100
+ struct emmc_block_dev emmc_dev ;
131
101
132
102
#define EMMC_BASE 0x20300000
133
103
#define EMMC_ARG2 0
Original file line number Diff line number Diff line change @@ -47,10 +47,39 @@ struct block_device
47
47
struct fs * fs ;
48
48
};
49
49
50
- int sd_card_init (struct block_device * * dev );
50
+ struct sd_scr ;
51
+
52
+ struct emmc_block_dev
53
+ {
54
+ struct block_device bd ;
55
+ uint32_t card_supports_sdhc ;
56
+ uint32_t card_supports_18v ;
57
+ uint32_t card_ocr ;
58
+ uint32_t card_rca ;
59
+ uint32_t last_interrupt ;
60
+ uint32_t last_error ;
61
+
62
+ struct sd_scr * scr ;
63
+
64
+ int failed_voltage_switch ;
51
65
52
- size_t sd_get_block_size ();
53
- size_t sd_get_num_blocks ();
66
+ uint32_t last_cmd_reg ;
67
+ uint32_t last_cmd ;
68
+ uint32_t last_cmd_success ;
69
+ uint32_t last_r0 ;
70
+ uint32_t last_r1 ;
71
+ uint32_t last_r2 ;
72
+ uint32_t last_r3 ;
73
+
74
+ void * buf ;
75
+ int blocks_to_transfer ;
76
+ size_t block_size ;
77
+ int use_sdma ;
78
+ int card_removal ;
79
+ uint32_t base_clock ;
80
+ };
81
+
82
+ int sd_card_init (struct block_device * * dev );
54
83
55
84
size_t sd_read (uint8_t * buf , size_t buf_size , uint32_t block_no );
56
85
size_t sd_write (uint8_t * buf , size_t buf_size , uint32_t block_no );
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments