기존 이솝 임베디드 포럼의 지식인 서비스가 게시판 형태로 변경되었습니다.

처음으로 인사드립니다. 제 이름은 민경오이고요. 현재 S3C6410 Baord에 Linux를 올려서 작업 중입니다.
우선 홈지기께서는 2.6.28 Kernel을 이용해서 부팅하셨다고 봤고요. 로그도 보았습니다. 아래는 현재 제가 겪고 있는 문제의 로그고요
아래 보시면 Starting Error가 있는데, 결국 문제는 0x74300000의 가상 주소를 받아서 처리 하는 부분 같은데,
static int ohci_run (struct ohci_hcd *ohci) 함수 내에서 ohci->regs의 주소가 0xC8E00000를 받는데, 이부분에 write가 되지 않습니다.
제가 리눅스 쪽은 초보이고 며칠째 작업 중이라 해결이 안되어 문의 드립니다. 혹 아시는 정보 있으시면 공유 부탁드립니다.
추가로 JTAG에서 A:0x74300000에 direct write를 하려해도 값이 변경되지 않네요. 어떤 다른 조건이 있을까요?

Linux............................................................................................................................ done, booting the kernel.
Linux version 2.6.27 (jack@jack-linux) (gcc version 4.2.1) #78 Mon Apr 6 14:53:35 KST 2009
CPU: ARMv6-compatible processor [410fb766] revision 6 (ARMv7), cr=00c5387f
Machine: SMDK6410
Memory policy: ECC disabled, Data cache writeback
CPU S3C6410 (id 0x36410101)
S3C24XX Clocks, (c) 2004 Simtec Electronics
S3C64XX: PLL settings, A=666000000, M=532000000, E=24000000
S3C64XX: HCLK2=266000000, HCLK=133000000, PCLK=66500000
mout_apll: source is fout_apll (1), rate is 666000000
mout_epll: source is fout_epll (1), rate is 24000000
mout_mpll: source is mpll (1), rate is 532000000
mmc_bus: source is mout_epll (0), rate is 24000000
mmc_bus: source is mout_epll (0), rate is 24000000
mmc_bus: source is mout_epll (0), rate is 24000000
usb-host-bus: source is mout_epll (0), rate is 24000000
uclk1: source is dout_mpll (1), rate is 66500000
spi-bus: source is mout_epll (0), rate is 24000000
spi-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
irda-bus: source is mout_epll (0), rate is 24000000
CPU0: D VIPT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: root=/dev/mtdblock2 rootfstype=yaffs2 init=/init console=ttySAC0,115200
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 125296KB available (3216K code, 736K data, 500K init)
SLUB: Genslabs=12, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 331.77 BogoMIPS (lpj=829440)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 288 bytes
NET: Registered protocol family 16
S3C6410 Power Management, (c) 2008 Samsung Electronics
[JAKE] s3c6410_pm_init
s3c64xx_init_irq_eint
S3C6410: Initialising architecture
S3C DMA-pl080 Controller Driver, (c) 2006-2007 Samsung Electronics
Total 32 DMA channels will be initialized.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
ashmem: initialized
yaffs Apr  6 2009 14:49:33 Installing.
msgmni has been set to 244
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
S3C_LCD clock got enabled :: 133.000 Mhz
LCD TYPE :: LTE480WV will be initialized
Window[0] - FB1: map_video_memory: clear ffc00000:0012c000
            FB1: map_video_memory: dma=57a00000 cpu=ffc00000 size=0012c000
Window[0] - FB2: map_video_memory: clear ffc96000:00096000
            FB2: map_video_memory: dma=57a96000 cpu=ffc96000 size=00096000
Console: switching to colour frame buffer device 80x30
fb0: s3cfb frame buffer device
s3c6400-uart.0: s3c2410_serial0 at MMIO 0x7f005000 (irq = 16) is a S3C6400/10
s3c6400-uart.1: s3c2410_serial1 at MMIO 0x7f005400 (irq = 20) is a S3C6400/10
brd: module loaded
loop: module loaded
logger: created 64K log 'log_main'
logger: created 256K log 'log_events'
logger: created 64K log 'log_radio'
cs89x0:cs89x0_probe(0x0)
cs89x0.c: v2.4.3-pre1 Russell Nelson <[email protected]>, Andrew Morton
eth0: cs8900 rev J found at 0xf7600300
cs89x0: Extended EEPROM checksum bad and no Cirrus EEPROM, relying on command line
cs89x0 media RJ-45, IRQ 111, programmed I/O, MAC 00:09:c0:ff:ec:48
cs89x0_probe1() successful
Linux video capture interface: v2.00
S3C NAND Driver, (c) 2008 Samsung Electronics
S3C NAND Driver is using hardware ECC.
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
Creating 4 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x00000000-0x00040000 : "Bootloader"
0x00040000-0x00400000 : "Kernel"
0x00400000-0x05400000 : "Rootfs"
0x05400000-0x08000000 : "File System"
usbmon: debugfs is not available
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 79, io mem 0x74300000
s3c2410-ohci s3c2410-ohci: init err (00000000 0000)
ohci_hcd: can't start s3c24xx
s3c2410-ohci s3c2410-ohci: startup error -75
s3c2410-ohci s3c2410-ohci: USB bus 1 deregistered
Unable to handle kernel NULL pointer dereference at virtual address 00000008
pgd = c0004000

고현철

2009.04.07 17:51:13
*.94.41.89

custom board인가요? 아니면 smdk6410인가요?
aesop-6410?

2.6.28에 대한 코드는 아예 인터넷에 공개되어 있습니다. 2.6.28-rc8요
그리고, 삼성에서 제공하는 2.6.28.6 커널도 있습니다.

궂이 2.6.27에 포팅해야하는 이유가 좀 궁금하네요....android때문인가요?

aesop-6410이라면 usb가 동작하지 않습니다.(기존 코드로는)
이유는 clock을 OSC에서 crystal로 변경했기 때문입니다.

PHYCLK관련 레지스터를 0x20에서 0x00으로 변경시켜주셔야 합니다

민경오

2009.04.07 18:25:26
*.148.71.182

빠른 답변 감사드립니다.
네 맞습니다. 일단 2.6.28에서 일부분을 가져온 상태입니다. 헌데 2.6.28-6 혹은 2.6.28-rc8에서는  USB Host관련내용과 OHCI 관련 feature 만 변경을 해도 동작을 하는게 맞나요?

민경오

2009.04.07 18:28:42
*.148.71.182

추가로 smdk6410 board상에서도 같은 결과 입니다.

고현철

2009.04.07 19:25:48
*.94.41.89

음.....2.6.28 두 버전다 문제는 없었던 것으로 기억이 납니다.

ohci-s3c2410 만 가져오시면 될거라고 보여집니다만....

민경오

2009.04.07 23:40:57
*.148.71.182

흐미... 2.6.18-rc8 커널에서도 동일한 문제가 나오네요. 수정사항이라고 해봐야 mach-smdk6410.c 에 usb device 추가하고, devs.c에 s3c_device_usb에 대한 정보 추가하고, 물론 PA address를 0x74300000으로 정의하고 Size를 1M 정도 잡아 주고, 말씀하신대로 ohci-s3c2410을 가져오는 작업을 했습니다. 물론 PHYCLK를 외부 clock 48M를 사용하는 것도 정의하고요. 이외 다른 세팅 부분이 있을까요?
CONFIG_USB_OHCI_HCD configration 값은 y로 선택되었습니다. 난감하네요...
위에서 질문드린대로 혹, .break 상태에서 0x74300000에 JTAG으로 직접 wrtite가 안되는 문제가 영향이 있을까요?

고현철

2009.04.08 00:40:41
*.94.41.89

MMU를 직접 세팅하지 않으셔도 됩니다. platform device가 올라갈때 세팅되도록 해 놨습니ㅏ.

민경오

2009.04.08 01:21:35
*.148.71.142

말씀하신 부분은 smdk6410_devices에 s3c_device_usb를 넣지 않아도 된다는 의미인가요?

김성재

2009.04.08 04:10:53
*.133.50.150

USB 클럭 세팅할때  

clk_set_parent(&clk_usbhost.clk, &clk_48m);

이렇게 해주시면 외부클럭으로 설정되는것 같습니다..

저는 s3c6400-clock.c 에서 void __init_or_cpufreq s3c6400_setup_clocks(void) 에 넣고 테스트 했습니다.
그러면 그 부분은 넘어가는 것 같습니다.
...

ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c-ohci s3c-ohci: S3C24XX OHCI
s3c-ohci s3c-ohci: new USB bus registered, assigned bus number 1
s3c-ohci s3c-ohci: irq 79, io mem 0x74300000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: S3C24XX OHCI
usb usb1: Manufacturer: Linux 2.6.29 ohci_hcd
usb usb1: SerialNumber: s3c24xx
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected

...

민경오

2009.04.08 14:39:24
*.41.230.68

답변 정말 감사합니다. 바로 해보겠습니다. ^^

민경오

2009.04.08 20:17:13
*.148.71.182

정말 감사드립니다. ..^^ 어떻게 감사들 드려야 할지.. 분석해 봐야 겠지만 아래와 같이 알려 주신 부분으로 해결이 되었습니다.
 감사드립니다.

Creating 4 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x00000000-0x00040000 : "Bootloader"
0x00040000-0x00400000 : "Kernel"
0x00400000-0x05400000 : "Rootfs"
0x05400000-0x08000000 : "File System"
usbmon: debugfs is not available
s3c2410-ohci s3c2410-ohci: S3C OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 79, io mem 0x74300000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver cdc_acm
cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
mice: PS/2 mouse device common for all mice

김성재

2009.04.08 22:48:40
*.133.50.150

잘 됐다니 다행입니다.
저도 마침 USB HOST에 대해서 같은 문제로 고민하다가 알게 되었습니다.

그 문제를 해결하니 다음과 같은 문제가 발생하여 어떻게 할지 몰라 글을 올려봅니다.
USB 메모리를 테스트 할려고 하는데 아래와 같은 메시지가 나옵니다.

usb 1-1: new full speed USB device using s3c-ohci and address 2
usb 1-1: device descriptor read/64, error -62
usb 1-1: device descriptor read/64, error -62
usb 1-1: new full speed USB device using s3c-ohci and address 3
usb 1-1: device descriptor read/64, error -62
usb 1-1: device descriptor read/64, error -62
usb 1-1: new full speed USB device using s3c-ohci and address 4
usb 1-1: device not accepting address 4, error -62
usb 1-1: new full speed USB device using s3c-ohci and address 5
usb 1-1: device not accepting address 5, error -62
hub 1-0:1.0: unable to enumerate USB device on port 1

민경오

2009.04.14 23:27:13
*.148.71.182

해결하셨는지 모르겠지만 clock.c 에서 disable_clock  중에 host clock을 죽이는 부분이 포함되어 있나 확인해 보세요.
List of Articles
번호 제목 글쓴이 날짜sort 조회 수
4508 nand 관련 질문입니다. [2] 임지영 2009-04-03 1016
4507 TFT-LCD 16bit 모드상에서의 문제 [3] 한석준 2009-04-04 880
4506 6410 SPI에 대해서 물어보겠습니다. [2] 주의이름으로 2009-04-04 1090
4505 SMDK6410에서의 OneNAND booting sequence [1] 김영문 2009-04-04 2444
4504 RNDIS/Ethernet Gadget 드라이버? [2] 두현택 2009-04-04 2324
4503 [S3C241x] MCU용 USB Device와 PC Host 와 통신해 보신분 계... 정민우 2009-04-05 1016
4502 H/W 코덱 MFC 관련 문의 [2] 홍성만 2009-04-06 833
4501 6410 칩 수급 관련해서 질문드립니다. [1] 홍경동 2009-04-06 635
4500 6410 카메라 커넥터 질문드립니다. [2] ForceNcool 2009-04-06 717
4499 안드로이더 에 touch cal 값을 어떻게 얻었나요? [3] 이성호 2009-04-06 2719
4498 안녕하세요~ 구입가능 한가요? [4] 박영준 2009-04-06 496
4497 S3C6410 부팅중 멈추는 현상에 대한 질문입니다. [2] 최종환 2009-04-06 1738
4496 안드로이드에서 인터넷 연결이 안된것으로 인식됩니다. [2] 이성호 2009-04-06 1099
4495 보드 부팅이 제대로 안되어서... [12] 노희준 2009-04-07 1434
» USB Host Starting이 안되네요. [12] 민경오 2009-04-07 1307
4493 S3C6410 SROMC의 wait / byte Enable 이 어떤 신호들인가요? [2] 여정휘 2009-04-08 891
4492 2차 보드 bsp 혹시 가지고 계신분??? [1] 진태영 2009-04-08 733
4491 /sbin/init 실행하다가..죽는 문제.. [6] 최종환 2009-04-08 809
4490 aesop6410 WinCE 6.0 Keypad Driver 요청합니다. [5] 여정휘 2009-04-08 1034
4489 Android 포팅 방법에 대한 질문 [11] 전병환 2009-04-09 7750

사용자 로그인