- 论坛徽章:
- 0
|
1)内核配置各选项情况如下:
SPIsupport ---- Config_SPI 开启SPI功能
Debugsupport for SPI drivers ---- config SPI_DEBUG 开启SPI debug调试
----SPIMaster Controller Drivers ---- depends on SPI_MASTER 生成spi.o
<*>AtmelSPI Controller ---- config SPI_ATMEL 生成atmel_spi.o
<*>BitbangingSPI master ---- config SPI_BITBANG 生成spi_bitbang.o
----SPI Protocol Masters ---- depends on SPI_MASTER
<>SPI EEPROMs from most vendors ---- config SPI_AT25 生成at25.o
<*>Usermode SPI device driver support ---- config SPI_SPIDEV 生成spidev.o
在Device Drivers---- > Character devices ---- >
取消选中SPI Driver(legacy) for at91rm9200 processor 。
2) 修改参数
在arch/arm/match-at91/board-dk.c中
static structspi_board_info dk_spi_devices[] = {
{ /* DataFlash chip*/
.modalias ="spidev",
.chip_select =0,
.max_speed_hz =15 * 1000 * 1000,
},
3)编译
make uImage
但是下到板子上/sys/class/下没有spidev的目录,/dev下也没有spidev0.0的设备节点
敬请高人指点
以上步骤是参照AT91RM9200关于SPI的移植(linux2.6.23)http://hi.baidu.com/sddghaladeng ... d1b73008f7ef24.html
我的内核版本是2.6.27 |
|