51 (edited by pixelk 2013-08-29 11:54:50)

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

and refresh_sd (on the PQI AirCard)  is

sync
umount /mnt/sd
mount -w -t vfat -o iocharset=utf8 --shortname=winnt /dev/mmcblk0p1 /mnt/sd

On the WifiSD it is

umount /mnt/sd
if [ $? != 0 ]; then
    exit 1
fi
mount -w -t vfat -o iocharset=utf8 --shortname=winnt /dev/mmcblk0p1 /mnt/sd

On the FluCard simply

umount /mnt/sd
mount -t vfat --shortname=winnt /dev/mmcblk0p1 /mnt/sd

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

Ok, FWIW to make the card boot standalone, without being plugged into a host:

KA2000#setenv bootalone 'go 208000'
KA2000#setenv bootcmd
KA2000#setenv bootcmd 'run set_bootargs; run bootalone'
KA2000#saveenv

Then it boots like this (but will no longer automatically handle firmware upgrades, you need to manually pause the bootloader and run 'mmc init' for that).

KA Boot 04240806
scu: 11c33303,00000000,00040404,00009f00,1
Status 1010800

Hit to stop :  2 1 0
go 208000
<4>(192-96-1)
console [ttyS0] enabled
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
cfg80211: Calling CRDA to update world regulatory domain
NET: Registered protocol family 2
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
ttyS0 at MMIO 0xa0004000 (irq = 1) is a KA2000
msgmni has been set to 58
loop: module loaded
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
starting pid 27, tty '/dev/console': '/etc/init.d/rcS'
KeyASIC WifiSD console ...
Sun Jan  1 00:00:00 UTC 2012
ka2000_sdhc: module license 'Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
(0>0)switch_modules
max_blk_size=512, max_blk_count=8, max_req_size=32768
init bomb irq
req irq 40 (1000000)
req irq 43 (40)
req irq 41 (43)
ka_sdhc_drv_init
use cmd9 preset val
mmc0: card lacks mandatory switch function, performance might suffer.
bw = 22
mmc0: new SD card at address 1234
wsd to sd
wsd to sd
umount: can't umount /mnt/sd: Invalid argument
cid = CID:7dd500281f0000102020434453454a74
Transcend Card
Transcend Card
gen_boa_passwd.sh - USER=admin PASS=admin
rcS done
start boa

-----------------------------------------------
  Production mode-VER. version_150_APR172013_TE.
-----------------------------------------------

sleep disable
[01/Jan/2012:00:00:03 +0000] boa: server version Boa/0.94.14rc21
[01/Jan/2012:00:00:03 +0000] boa: server built Apr 17 2013 at 18:28:52.
[01/Jan/2012:00:00:03 +0000] boa: starting server pid=75, port 80
..setup AP mode start
/usr/bin/auto_off.sh: stop
rmmod: can't unload 'ar6000': unknown symbol in module, or unknown parameter
ifconfig: SIOCGIFFLAGS: No such device
sdio wakeuplo        no wireless extensions.

rm: can't remove '/tmp/iwconfig_maln0.txt': No such file or directory

mmc1: new SDIO card at address 0001
ifconfig: SIOCGIFFLAGS: No such deviceAR6000: configuration opcode 7 is only used for RTOS systems, not Linux systems

ath6k/AR6003/hw2.1.1/athwlan.bin firmware will be loaded
AR6K: ** HIF layer does not support scatter requests (17) 
wmi_control_rx() : Unknown id 0x101e
Add Filter 0 = 01:00:5e:00:00:01
Keep Filter 0 = 01:00:5e:00:00:01
Keep Filter 0 = 01:00:5e:00:00:01
Keep Filter 0 = 01:00:5e:00:00:01
channel hint set to 0
Limit maximum connection count to 3 
/usr/bin/auto_off.sh: start
/usr/bin/kcard_app.sh: start
kcard_startup: Set call interval 10
KCARD: Notify driver about pid 140
(0>1)KCARD: Log = 0, Diff Disable, Path /tmp/filediff
Auto OFF 0 seconds
KCARD: Debounce = 1, WiFi Hide Disable, Skip Disable
WiFi 0 can't less then 60 seconds
kcard_print_dir_file_list: failed! get_file_list /mnt/sd/DCIM
KCARD: waitting for sig

sw:1,m1:01010800:       0:0:0:0,   0, wc0{0:0:0}{0:0:0}{0:0:0}{0:0:0}
CMD0!(1010800)

sw c0:0 (1-0)m2 c8
(0:0:1010800)0,0,0,0,0,0,0,0,0,0,0,0[repeats until plugged in]

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

I managed to sort out writing to the SD from the shell...

First I reformatted the card in the camera to get rid of any corrupted files that I had generated during previous trials.

Then after each write to the card I perform a sync and a remount like this:

echo "hello" > /mnt/sd/hello.txt  # Write something to card
sync
mount -o remount /mnt/sd

This seems to work.

I don't know why the refresh_sd command does a complete umount... if that happens at the same time as you take a photo, the image will be corrupt. Perhaps not that likely since it only runs every 60 seconds, but still.

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

moroboshi wrote:

Ok, FWIW to make the card boot standalone, without being plugged into a host:

KA2000#setenv bootalone 'go 208000'
KA2000#setenv bootcmd
KA2000#setenv bootcmd 'run set_bootargs; run bootalone'
KA2000#saveenv

Then it boots like this (but will no longer automatically handle firmware upgrades, you need to manually pause the bootloader and run 'mmc init' for that).

KA Boot 04240806
scu: 11c33303,00000000,00040404,00009f00,1
Status 1010800

Hit to stop :  2 1 0
go 208000
<4>(192-96-1)
console [ttyS0] enabled
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
cfg80211: Calling CRDA to update world regulatory domain
NET: Registered protocol family 2
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
ttyS0 at MMIO 0xa0004000 (irq = 1) is a KA2000
msgmni has been set to 58
loop: module loaded
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
starting pid 27, tty '/dev/console': '/etc/init.d/rcS'
KeyASIC WifiSD console ...
Sun Jan  1 00:00:00 UTC 2012
ka2000_sdhc: module license 'Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
(0>0)switch_modules
max_blk_size=512, max_blk_count=8, max_req_size=32768
init bomb irq
req irq 40 (1000000)
req irq 43 (40)
req irq 41 (43)
ka_sdhc_drv_init
use cmd9 preset val
mmc0: card lacks mandatory switch function, performance might suffer.
bw = 22
mmc0: new SD card at address 1234
wsd to sd
wsd to sd
umount: can't umount /mnt/sd: Invalid argument
cid = CID:7dd500281f0000102020434453454a74
Transcend Card
Transcend Card
gen_boa_passwd.sh - USER=admin PASS=admin
rcS done
start boa

-----------------------------------------------
  Production mode-VER. version_150_APR172013_TE.
-----------------------------------------------

sleep disable
[01/Jan/2012:00:00:03 +0000] boa: server version Boa/0.94.14rc21
[01/Jan/2012:00:00:03 +0000] boa: server built Apr 17 2013 at 18:28:52.
[01/Jan/2012:00:00:03 +0000] boa: starting server pid=75, port 80
..setup AP mode start
/usr/bin/auto_off.sh: stop
rmmod: can't unload 'ar6000': unknown symbol in module, or unknown parameter
ifconfig: SIOCGIFFLAGS: No such device
sdio wakeuplo        no wireless extensions.

rm: can't remove '/tmp/iwconfig_maln0.txt': No such file or directory

mmc1: new SDIO card at address 0001
ifconfig: SIOCGIFFLAGS: No such deviceAR6000: configuration opcode 7 is only used for RTOS systems, not Linux systems

ath6k/AR6003/hw2.1.1/athwlan.bin firmware will be loaded
AR6K: ** HIF layer does not support scatter requests (17) 
wmi_control_rx() : Unknown id 0x101e
Add Filter 0 = 01:00:5e:00:00:01
Keep Filter 0 = 01:00:5e:00:00:01
Keep Filter 0 = 01:00:5e:00:00:01
Keep Filter 0 = 01:00:5e:00:00:01
channel hint set to 0
Limit maximum connection count to 3 
/usr/bin/auto_off.sh: start
/usr/bin/kcard_app.sh: start
kcard_startup: Set call interval 10
KCARD: Notify driver about pid 140
(0>1)KCARD: Log = 0, Diff Disable, Path /tmp/filediff
Auto OFF 0 seconds
KCARD: Debounce = 1, WiFi Hide Disable, Skip Disable
WiFi 0 can't less then 60 seconds
kcard_print_dir_file_list: failed! get_file_list /mnt/sd/DCIM
KCARD: waitting for sig

sw:1,m1:01010800:       0:0:0:0,   0, wc0{0:0:0}{0:0:0}{0:0:0}{0:0:0}
CMD0!(1010800)

sw c0:0 (1-0)m2 c8
(0:0:1010800)0,0,0,0,0,0,0,0,0,0,0,0[repeats until plugged in]

I get mine to boot with the instructions above, however it doesn't mount the SD card.
Even when logged in trying to mount it won't work:

mount -w -t vfat -o iocharset=UTF8 --shortname=winnt /dev/mmcblk01 /mnt/sd
mount: mounting /dev/mmcblk0p1 on /mnt/sd failed: No such device or address

ls -la /dev/mmcblk0p1
brwxrwxrwx   1   0       0         179,    1  Jan   3   2012   /dev/mmcblk0p1

55 (edited by pixelk 2013-08-30 09:21:06)

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

I fear the flash controller (the EN2683B on top of the board) needs to be connected to a host to init, and without that, the sd is not available.

I'm having a hard time to speak to the PQI AirCard with my serial console but it seems it suffers from the same shortcomings in SPI mode judging from the console output i get.

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

pixelk wrote:

I fear the flash controller (the EN2683B on top of the board) needs to be connected to a host to init, and without that, the sd is not available.

I'm having a hard time to speak to the PQI AirCard with my serial console but it seems it suffers from the same shortcomings in SPI mode judging from the console output i get.

Actually it seems to be more of a software-problem.  At least from looking a bit at the code and register names:

There are two pretty much identical SD-controllers, one for the wifi and one for the sd.
However in between the second one, the SD and the host sits a 'switch', which has it's own register space.
The host is 'Master 1' and the uC 'Master 2'.
The sdhc.ko driver has references like 'deselect_m2', 'select_m2', 'wait_m1_data_done' and so on.

Since it's purpose is to allow accessing the SD in a way that is transparent to the host, the host has priority and it waits for the host to initialize the SD first.  The switch seems to have registers that track responses to various command and by that the SD card state (so the SoC driver can talk to the SD without altering it's state to much, say 4bit-mode vs 1bit-mode, relative card address, what the MMC/SD state machine is in and similar).

But I don't think the hardware prevents the SoC from taking over control by using 'select_m2' and the initializing the SD itself.
This should be as simple as:
REG_A000A000 = 0x00000000 (deselect M1)
REG_A000A004 = 0x00000001 (select M2)
vs.
REG_A000A004 = 0x00000000 (deselect M2)
REG_A000A000 = 0x00000001 (select M1)
to switch back, according to the disassembly bits I looked at.

57 (edited by cnlohr 2013-08-31 23:08:05)

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

Regarding the transcend:

I know I'm late to the game, but I am trying to get this card to come up with a custom controller.  I used the same SD card stack I've used on other projects, but I simply CANNOT get the wifi or the autoexec.sh to come up.  Additionally, when I try writing to a partition I made on the card I get corruption!  I've tried checking, double and triple checking all power, connections, everything.

Reading works like a charm, but I am at a brick wall and am getting extremely frustrated. I've tried configuring all of the power and initialization registers six ways to sunday and nothing.

I even wrote my own stack that works with the SD protocol, and I still cannot get the WIFI to turn on!!!


Pic:
SDCard http://imgur.com/PZbOwnZ

Writing sequantially 00 .. ff with increasing the start number every time.  There should be no FF's visible.  I even verified that the FF's are what are written to the card by looking at this card in another reader.

Card OK; Cap:1 / OCRR: C0
00002000
01E0A6E1
00000000
00000000
01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 3F FF FF FF FF FF FA 1B 1C 1D 1E 1F 20 
02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 3F FF FF FF FF FF FA 1B 1C 1D 1E 1F 20 FF 
03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 3F FF FF FF FF FF FA 1B 1C 1D 1E 1F 20 FF FF 
04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 3F FF FF FF FF FF FA 1B 1C 1D 1E 1F 20 FF FF FF 
05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 3F FF FF FF FF FF FA 1B 1C 1D 1E 1F 20 FF FF FF FF 
06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 3F FF FF FF FF FF FA 1B 1C 1D 1E 1F 20 FF FF FF FF FF 
07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 3F FF FF FF FF FF FA 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF 
08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 3F FF FF FF FF FF FA 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 
09 0A 0B 0C 0D 0E 0F 10 11 12 13 3F FF FF FF FF FF FA 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 28 
0A 0B 0C 0D 0E 0F 10 11 12 13 3F FF FF FF FF FF FA 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 28 29 
0B 0C 0D 0E 0F 10 11 12 13 3F FF FF FF FF FF FA 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 28 29 2A 
0C 0D 0E 0F 10 11 12 13 3F FF FF FF FF FF FA 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 28 29 2A 2B 
0D 0E 0F 10 11 12 13 3F FF FF FF FF FF FA 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 28 29 2A 2B 2C 
0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 28 29 2A 2B 2C 2D 
0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 28 29 2A 2B 2C 2D 2E 
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 28 29 2A 2B 2C 2D 2E 2F 
11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 28 29 2A 2B 2C 2D 2E 2F 30 
12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 28 29 2A 2B 2C 2D 2E 2F 30 31 
13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 28 29 2A 2B 2C 2D 2E 2F 30 31 32 
14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 
15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 3F 
16 17 18 19 1A 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 3F FF 
17 18 19 1A 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 3F FF FF 
18 19 1A 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 3F FF FF FF 
19 1A 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 3F FF FF FF FF 
1A 1B 1C 1D 1E 1F 20 FF FF FF FF FF FF A7 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 3F FF FF FF FF FF 
1B 1C 1D 1E 1F 20 21 FF FF FF FF FF FF A8 29 2A 2B 2C 2D 2E 2F 30 31 32 33 3F FF FF FF FF FF FA 
1C 1D 1E 1F 20 21 22 23 3F FF FF FF FF FF EA 2B 2C 2D 2E 2F 30 31 32 33 3F FF FF FF FF FF FA 3B 
1D 1E 1F 20 21 22 23 3F FF FF FF FF FF EA 2B 2C 2D 2E 2F 30 31 32 33 3F FF FF FF FF FF FA 3B 3C 
1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 3F FF FF FF FF FF FA 3B 3C 3D 
1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 3F FF FF FF FF FF FA 3B 3C 3D 3E 

ADDITIONALLY! I can confirm that the controller does not come online until you start initializing externally, as the startup period does not begin at power on but rather after external initialization.

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

Spent this weekend trying to make 3.10.10 boot.  Timer, IRQs and SPI / nor-flash are working.
Not very useful yet as the only way it can talk to the outside is the serial port. smile

KA Boot 04240806
scu: 11c33303,00000000,00040404,00009f00,1
Status 20200804

Hit to stop :  2 1 0
Status 20200804
RCA0 68, RCA1 b3
....reading program.bin
...<mmc1>..reading zimage
................................................................................................................................................................................................................................................................................................................................................................................................
1550384 bytes read
go 208000
Uncompressing Linux... done, booting the kernel.
atags_ptr=00000000 machine_nr=00004000
setup_dma_zone
parse_early_param
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.10.10 (ranma@nukunuku) (gcc version 4.6.4 (OpenWrt/Linaro GCC 4.6-2012.12 r37859) ) #93 Mon Sep 2 00:17:53 CEST 2013
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] atags_ptr=00000000 machine_nr=00004000
[    0.000000] Machine: KeyASIC Ka2000 EVM
[    0.000000] setup_dma_zone
[    0.000000] parse_early_param
[    0.000000] bootconsole [earlycon0] enabled
arm_memblock_init
[    0.000000] arm_memblock_init
paging_init
[    0.000000] paging_init
[    0.000000] Memory policy: ECC disabled, Data cache writeback
ka2000_map_io
[    0.000000] ka2000_map_io
[    0.000000] BUG: mapping for 0xa0000000 at 0xff000000 out of vmalloc space
mdesc->init_early()
[    0.000000] mdesc->init_early()
ka2000_init_early
[    0.000000] ka2000_init_early
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8120
[    0.000000] Kernel command line: earlyprintk console=ttyS0,38400 mem=32M
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 32MB = 32MB total
[    0.000000] Memory: 20468k/20468k available, 12300k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc2800000 - 0xff000000   ( 968 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc03e8d2c   (3972 kB)
[    0.000000]       .init : 0xc03e9000 - 0xc040f2b4   ( 153 kB)
[    0.000000]       .data : 0xc0410000 - 0xc0592dc0   (1548 kB)
[    0.000000]        .bss : 0xc0592dc0 - 0xc0ba8ce4   (6232 kB)
[    0.000000] NR_IRQS:16 nr_irqs:64 64
ka2000_init_irq
pending interrupts: 0000000000000000
ka2000_init_time
[    0.000000] sched_clock: 16 bits at 23kHz, resolution 42667ns, wraps every 2796ms
[    0.000000] kmemleak: Kernel memory leak detector disabled
[    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.000000] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.000000] ... MAX_LOCK_DEPTH:          48
[    0.000000] ... MAX_LOCKDEP_KEYS:        8191
[    0.000000] ... CLASSHASH_SIZE:          4096
[    0.000000] ... MAX_LOCKDEP_ENTRIES:     16384
[    0.000000] ... MAX_LOCKDEP_CHAINS:      32768
[    0.000000] ... CHAINHASH_SIZE:          16384
[    0.000000]  memory used by lock dependency info: 3951 kB
[    0.000000]  per task-struct memory footprint: 2304 bytes
[    0.000000] ODEBUG: selftest passed
[    0.000000] kmemleak: Early log buffer exceeded (1008), please increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE
[    0.234543] Calibrating delay loop... 417.79 BogoMIPS (lpj=2088960)
[    0.446345] pid_max: default: 32768 minimum: 301
[    0.471647] Mount-cache hash table entries: 512
[    0.521525] CPU: Testing write buffer coherency: ok
[    0.548534] Setting up static identity map for 0xc00122e8 - 0xc0012324
[    0.646925] NET: Registered protocol family 16
[    0.670520] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.727951] ka2000_evm_init
[    0.761274] ka2000_evm_init done
[    1.248282] bio: create slab <bio-0> at 0
[    1.433758] cfg80211: Calling CRDA to update world regulatory domain
[    1.470922] Switching to clocksource TCNTO2
[    1.595895] NET: Registered protocol family 2
[    1.633357] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    1.656739] TCP bind hash table entries: 512 (order: 2, 22528 bytes)
[    1.677987] TCP: Hash tables configured (established 512 bind 512)
[    1.699918] TCP: reno registered
[    1.711012] UDP hash table entries: 256 (order: 2, 24576 bytes)
[    1.731450] UDP-Lite hash table entries: 256 (order: 2, 24576 bytes)
[    1.766693] NET: Registered protocol family 1
[    1.788752] SPI: CON=00000f03 PRE=00000008 STA=00000000
[    1.821649] ka2000_ssp_spi ka2000_ssp_spi: master is unqueued, this is deprecated
[    1.846908] Adding platform devices...
[    1.858471] Adding flash chip m25p80
[    1.887741] ka_sdio_probe
[    1.896701] ka2000_sdmci: probe of ka2000_sdmci failed with error -22
[    2.011904] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.029781] jffs2: version 2.2 (NAND) (SUMMARY) (ZLIB) (RTIME) (c) 2001-2006 Red Hat, Inc.
[    2.069804] msgmni has been set to 39
[    2.139394] io scheduler noop registered
[    2.151811] io scheduler deadline registered (default)
[    2.212953] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    2.279045] serial8250.0: ttyS0 at MMIO 0xa0004000 (irq = 0) is a 8250
[    2.300038] console [ttyS0] enabled, bootconsole disabled
[    2.300038] console [ttyS0] enabled, bootconsole disabled
[    2.416136] ka2000_ssp_spi_txrx_mode3 9f 8: 00
[    2.430686] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    2.445918] Creating 5 MTD partitions on "mx25l6405d":
[    2.462089] 0x000000080000-0x000000200000 : "rootfs"
[    2.537440] split_squashfs: no squashfs found in "mx25l6405d"
[    2.555190] 0x000000200000-0x000000500000 : "kernel"
[    2.619191] 0x000000500000-0x000000800000 : "Ramdisk"
[    2.684473] 0x000000080000-0x000000800000 : "JFFS2_Kernel_RFS"
[    2.751034] 0x000000200000-0x000000800000 : "Kernel_RFS"
[    0.085719] TCP: cubic registered
[    0.096172] NET: Registered protocol family 17
[    0.112727] 8021q: 802.1Q VLAN Support v1.8
[    0.128813] lib80211: common routines for IEEE802.11 drivers
[    0.184110] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    0.233391] VFS: Cannot open root device "(null)" or unknown-block(0,255): error -6
[    0.256389] Please append a correct "root=" boot option; here are the available partitions:
[    0.281947] 1f00            1536 mtdblock0  (driver?)
[    0.297265] 1f01            3072 mtdblock1  (driver?)
[    0.312966] 1f02            3072 mtdblock2  (driver?)
[    0.328284] 1f03            7680 mtdblock3  (driver?)
[    0.343559] 1f04            6144 mtdblock4  (driver?)
[    0.359602] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,255)
[    0.384989] CPU: 0 PID: 1 Comm: swapper Not tainted 3.10.10 #93
[    0.402739] Backtrace: 
[    0.410248] [<c0015a40>] (dump_backtrace+0x0/0x110) from [<c0015be0>] (show_stack+0x18/0x1c)
[    0.435550]  r6:00008001 r5:c1b4f000 r4:c1b4f000 r3:00200140
[    0.452745] [<c0015bc8>] (show_stack+0x0/0x1c) from [<c016b40c>] (dump_stack+0x20/0x28)
[    0.476810] [<c016b3ec>] (dump_stack+0x0/0x28) from [<c001cf1c>] (panic+0x9c/0x208)
[    0.499893] [<c001ce80>] (panic+0x0/0x208) from [<c03ea020>] (mount_block_root+0x274/0x2cc)
[    0.524896]  r3:c18b2000 r2:00000000 r1:c18b3ed0 r0:c037932b
[    0.542006]  r7:c03ffec0
[    0.549729] [<c03e9dac>] (mount_block_root+0x0/0x2cc) from [<c03ea0cc>] (mount_root+0x54/0x6c)
[    0.575628] [<c03ea078>] (mount_root+0x0/0x6c) from [<c03ea20c>] (prepare_namespace+0x128/0x180)
[    0.601954]  r5:c03ffeb8 r4:c0592e24
[    0.612834] [<c03ea0e4>] (prepare_namespace+0x0/0x180) from [<c03e9bf4>] (kernel_init_freeable+0x17c/0x1c8)
[    0.642019]  r5:c03ffeb8 r4:00000007
[    0.652899] [<c03e9a78>] (kernel_init_freeable+0x0/0x1c8) from [<c000cf94>] (kernel_init+0x10/0x104)
[    0.680334] [<c000cf84>] (kernel_init+0x0/0x104) from [<c0008da0>] (ret_from_fork+0x14/0x34)
[    0.705636]  r4:00000000 r3:00000000

59 (edited by pixelk 2013-09-04 20:02:51)

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

New Transcend firmware available http://www.transcend-info.com/files/Driver/WiFiSD_v1.8.zip (Added to first post)
1. Add Chrome browser plug-in for downloading photo.
2. Add refresh button for video and photo page.
3. Remove recreation of DCIM folder.
4. Support Raw file format. -- Supported formats : ((cr2)|(srw)|(rwl)|(rw2)|(raw)|(pef)|(nrw)|(nef)|(kdc)|(k25)|(dcr)|(
srf)|(sr2)|(arw)|(orf)) .

Build Date : 2013/08/16 13:10:43
Revision : V1.8

our favorite part of rcS is still here

# autorun.sh from sd in case need to perform some test mode
if [ -f /mnt/sd/autorun.sh ]
then
    echo "run autorun.sh"
    echo "run autorun.sh" >> /tmp/log.rcS
    sleep 1
    chmod 777 /mnt/sd/autorun.sh
    /mnt/sd/autorun.sh 
fi

In fact most of the files were untouched.

Just by comparing the directories :
- new, smaller busybox build
- new, smaller dcraw build
- only two /usr/bin script modified control_create and factory_reset, to disbale the creation of the control folder 199_WIFI
- most of the changes occur in the /www folder, to add the "chrome downloader"

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

Which one would be currently best for hacking, PQI Aircard, Flucard or Transcend? I tried to guess but ...

How if by just PQI Aircard adapter without any card, and then add own memory to it?
http://www.newegg.com/Product/Product.aspx?Item=N82E16820141601
Maybe PQI 6W25-016GR1 is not good for experiments?

61 (edited by pixelk 2013-09-07 16:47:25)

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

As the three cards are 99% the same hardware-wise
- If you can buy one easily the cardless PQI is the best value for money (provided you already have some µSD laying around)
- If you want to hardware hack (involving solder) the PQI and Transcend one are the only one documented yet, but you're welcome to share your discoveries about the flucard.
- If you want to mod the official firmware, they are all based on the same basic tools, and can be extended easily
- If you want to compile your own firmware, anyone should do

The µSD provided in the PQI bundles are inferior, Class 4 speed, if you can't provide a µSD you may be better with a Transcend WifiSD which provides (fixed, soldered) Class 10 memory.
The transcend Bundle also offers a very capable SD-Card/µSD reader.

62 (edited by moroboshi 2013-09-08 13:55:33)

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

It seems the card SoC may have a hardware flaw:

I can't get the ARM "Wait for interrupt" sleep mode to work properly.
It looks like maybe the timer block isn't clocked during sleep, so it can't wake itself up.
Maybe there is just some register fiddling in the system block required, but without documentation that'll be hard to get to work.

I had to override the arch_pm_idle hook to a noop function (it defaults to a arm926 WFI handler to save power).
It's not that it doesn't work at all, I've got some successful wakeups from host-side SD card events (e.g. mounting the card on the host while it's plugged into the card reader), so in general cpu sleep seems to work, I'm just missing a reliable wake-up source.  Incidentally in the available GPL sources the corresponding code to put the cpu into sleep is also commented out.

[edit]
At least switching the ARM from PLL to OSC and turning off the PLL during idle seems to improve power usage quite a bit, it's no longer noticeably warm when idle. smile
As a compromise for that I'm now setting the AHB/HCLK so it's always at OSC speed, so timer clocks don't change when changing cpu speed between 192MHz and 24MHz.
[/edit]

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

First time I got it to read the mmc partition table using my re-implemented sd driver (The original one is polling instead of using irqs):

The important bit:

[   16.639476]  mmcblk0: p1

The whole shebang including debugging printks:

KA Boot 04240806
scu: 11c33303,00000000,00040404,00009f00,1
Status 20200804

Hit to stop :  2 1 0
Status 20200804
RCA0 68, RCA1 b3
....reading program.bin
...<mmc1>..reading uImage
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
2262912 bytes read
*  kernel: cmdline image address = 0x00800000
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   KA2000
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2262848 Bytes = 2.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   kernel data at 0x00800040, len = 0x00228740 (2262848)
   Loading Kernel Image ... OK
OK
   kernel loaded at 0x00008000, end = 0x00230740
## Transferring control to Linux (at address 00008000) ...

Starting kernel ...

Cleanup - disable icache, dcache, mmu.

Running theKernel ... r0=0, r1=385, r2=00000100

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.11.0 (ranma@nukunuku) (gcc version 4.6.4 (OpenWrt/Linaro GCC 4.6-2012.12 r37859) ) #275 Mon Sep 9 01:51:52 CEST 2013
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: KeyASIC Ka2000 EVM
[    0.000000] Ignoring tag cmdline (using the default kernel command line)
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: ECC disabled, Data cache writeback
ka2000_map_io
[    0.000000] ka2000_map_io
ka2000_init_early
[    0.000000] ka2000_init_early
[    0.000000] CLK_SRC_CTL=11c33303
[    0.000000] PLL_FREQ_SEL1=00000000
[    0.000000] PLL_FREQ_SEL2=00040404
[    0.000000] SYSTEM_CTL1=00009f00
[    0.000000] Switching HCLK to OSC rate (power-save).
[    0.000000] Switching to 192000KHz ARM clock, 24000KHz HCLK, SRC_CTL=11c3330f PLL_CTL=9f00.
[    0.000000] Now on OSC clock. CLK_SRC_CTL=11c33300
[    0.000000] Waited 373 loops for PLL startup
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8120
[    0.000000] Kernel command line: earlyprintk console=ttyS0,38400 mem=32M
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 19048K/32768K available (2614K kernel code, 1541K rwdata, 792K rodata, 3244K init, 5128K bss, 13720K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc2800000 - 0xff000000   ( 968 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc035bd4c   (3408 kB)
[    0.000000]       .init : 0xc035c000 - 0xc068722c   (3245 kB)
[    0.000000]       .data : 0xc0688000 - 0xc0809700   (1542 kB)
[    0.000000]        .bss : 0xc0809700 - 0xc0d0ba6c   (5129 kB)
[    0.000000] NR_IRQS:16 nr_irqs:64 64
ka2000_init_irq
ka2000_init_time HZ=100 div=500 freq=100 csfreq=6250
[    0.000000] set_mode_t1(1)
[    0.000000] set_mode_t1(2)
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] kmemleak: Kernel memory leak detector disabled
[    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.000000] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.000000] ... MAX_LOCK_DEPTH:          48
[    0.000000] ... MAX_LOCKDEP_KEYS:        8191
[    0.000000] ... CLASSHASH_SIZE:          4096
[    0.000000] ... MAX_LOCKDEP_ENTRIES:     16384
[    0.000000] ... MAX_LOCKDEP_CHAINS:      32768
[    0.000000] ... CHAINHASH_SIZE:          16384
[    0.000000]  memory used by lock dependency info: 3935 kB
[    0.000000]  per task-struct memory footprint: 2304 bytes
[    0.000000] ODEBUG: selftest passed
[    0.000000] kmemleak: Early log buffer exceeded (1054), please increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE
[    0.289080] Calibrating delay loop... 93.08 BogoMIPS (lpj=465408)
[    0.394294] pid_max: default: 32768 minimum: 301
[    0.438940] Mount-cache hash table entries: 512
[    0.537441] CPU: Testing write buffer coherency: ok
[    0.583289] Setting up static identity map for 0xc02942f8 - 0xc0294334
[    0.953512] NET: Registered protocol family 16
[    0.997216] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    1.108350] ka2000_evm_init
[    1.120683] ka2000_sys_init
[    1.132770] Could not get HCLK, failed to update device clocks.
[    1.230217] ka2000_evm_init done
[    2.030744] bio: create slab <bio-0> at 0
[    2.393682] Switched to clocksource WDTCNT
[    2.673646] NET: Registered protocol family 2
[    2.751476] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    2.779901] TCP bind hash table entries: 512 (order: 2, 22528 bytes)
[    2.801264] TCP: Hash tables configured (established 512 bind 512)
[    2.832493] TCP: reno registered
[    2.845935] UDP hash table entries: 256 (order: 2, 24576 bytes)
[    2.868795] UDP-Lite hash table entries: 256 (order: 2, 24576 bytes)
[    2.920613] NET: Registered protocol family 1
[   10.213814] SPI: CON=00000f03 PRE=00000005 STA=00000000
[   10.264213] ka2000_ssp_spi ka2000_ssp_spi: master is unqueued, this is deprecated
[   10.291877] Adding platform devices...
[   10.304592] Adding flash chip m25p80
[   10.380312] KA2000 CPU frequency change support initialized (min=24000 max=192000)
[   10.418297] sdswitch bootval m1=1 m2=0
[   10.431962] sdswitch now m1=1 m2=0
[   10.450162] mmc: Mapping A000B000 to A000BFFF
[   10.470015] mmc: pdev id 0 (sd), base irq 24, index 0
[   10.607844] ka2000_mmc_set_ios (0KHz, width=0)
[   10.638395] ka2000_mmc_set_ios (400KHz, width=0)
[   10.669722] sdswitch bootval m1=0 m2=1
[   10.682722] sdswitch now m1=0 m2=1
[   10.695493] mmc: Mapping A0009000 to A0009FFF
[   10.712148] mmc: pdev id 1 (sdio), base irq 32, index 1
[   10.752671] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
[   10.775174] ka2000_mmc_start_command 0 opcode=0034 arg=00000c00 flags=00000195
[   10.798210] ka2000_mmc_cmd_done_irq 0 00000014 status=00000c00
[   10.818645] ka2000_mmc_start_command 0 opcode=0034 arg=80000c08 flags=00000195
[   10.841440] ka2000_mmc_cmd_done_irq 0 00000014 status=00000c00
[   10.860712] ka2000_mmc_set_ios (400KHz, width=0)
[   10.882378] ka2000_mmc_start_command 0 opcode=0000 arg=00000000 flags=000000c0
[   10.905464] ka2000_mmc_cmd_done_irq 0 00000004 status=00000c00
[   10.951632] ka2000_mmc_set_ios (0KHz, width=0)
[   10.969012] ka2000_mmc_set_ios (400KHz, width=0)
[   10.985645] ka2000_mmc_start_command 0 opcode=0008 arg=000001aa flags=000002f5
[   11.008714] ka2000_mmc_cmd_done_irq 0 00000004 status=00000c00
[   11.028210] ka2000_mmc_start_command 0 opcode=0005 arg=00000000 flags=000002e1
[   11.050990] ka2000_mmc_cmd_done_irq 0 00000014 status=00000c00
[   11.070173] ka2000_mmc_start_command 0 opcode=0005 arg=00000000 flags=000002e1
[   11.092927] ka2000_mmc_cmd_done_irq 0 00000014 status=00000c00
[   11.111888] ka2000_mmc_start_command 0 opcode=0005 arg=00000000 flags=000002e1
[   11.134580] ka2000_mmc_cmd_done_irq 0 00000014 status=00000c00
[   11.153488] ka2000_mmc_start_command 0 opcode=0005 arg=00000000 flags=000002e1
[   11.176576] ka2000_mmc_cmd_done_irq 0 00000014 status=00000c00
[   11.196504] ka2000_mmc_start_command 0 opcode=0037 arg=00000000 flags=000000f5
[   11.219265] ka2000_mmc_cmd_done_irq 0 00000004 status=00000c00
[   11.238883] ka2000_mmc_start_command 0 opcode=0029 arg=00000000 flags=000000e1
[   11.262084] ka2000_mmc_cmd_done_irq 0 00000004 status=00000c00
[   11.281393] ka2000_mmc_set_ios (400KHz, width=0)
[   11.296765] ka2000_mmc_set_ios (400KHz, width=0)
[   11.312273] ka2000_mmc_set_ios (400KHz, width=0)
[   11.330203] ka2000_mmc_start_command 0 opcode=0000 arg=00000000 flags=000000c0
[   11.353144] ka2000_mmc_cmd_done_irq 0 00000004 status=00000c00
[   11.374938] ka2000_mmc_set_ios (400KHz, width=0)
[   11.391535] ka2000_mmc_start_command 0 opcode=0008 arg=000001aa flags=000002f5
[   11.414347] ka2000_mmc_cmd_done_irq 0 00000004 status=00000c00
[   11.433833] ka2000_mmc_start_command 0 opcode=0037 arg=00000000 flags=000000f5
[   11.456601] ka2000_mmc_cmd_done_irq 0 00000004 status=00000c00
[   11.476308] ka2000_mmc_start_command 0 opcode=0029 arg=40300000 flags=000000e1
[   11.499052] ka2000_mmc_cmd_done_irq 0 00000004 status=00000c00
[   11.549925] ka2000_mmc_start_command 0 opcode=0037 arg=00000000 flags=000000f5
[   11.572994] ka2000_mmc_cmd_done_irq 0 00000004 status=00000c00
[   11.592507] ka2000_mmc_start_command 0 opcode=0029 arg=40300000 flags=000000e1
[   11.615282] ka2000_mmc_cmd_done_irq 0 00000004 status=00000c00
[   11.634707] ka2000_mmc_start_command 0 opcode=0002 arg=00000000 flags=00000067
[   11.657453] ka2000_mmc_cmd_done_irq 0 00000004 status=00000c00
[   11.677906] ka2000_mmc_start_command 0 opcode=0003 arg=00000000 flags=00000075
[   11.701378] ka2000_mmc_cmd_done_irq 0 00000004 status=00000c00
[   11.720965] ka2000_mmc_start_command 0 opcode=0009 arg=b3680000 flags=00000007
[   11.743741] ka2000_mmc_cmd_done_irq 0 00000004 status=00000c00
[   11.763117] ka2000_mmc_start_command 0 opcode=0007 arg=b3680000 flags=00000015
[   11.785847] ka2000_mmc_cmd_done_irq 0 00000004 status=00000c00
[   11.805167] ka2000_mmc_start_command 0 opcode=0037 arg=b3680000 flags=00000095
[   11.827927] ka2000_mmc_cmd_done_irq 0 00000004 status=00000c00
[   11.847594] ka2000_mmc_start_command 0 opcode=0033 arg=00000000 flags=000000b5
[   11.870300] *** data read command! block_reg=00080001 ***
[   11.887583] ka2000_mmc_cmd_done_irq 0 00000006 status=00000c00
[   11.905697] ka2000_mmc_tran_done_irq 0 00000002 status=00000c00 blocks=00080001
[   11.927960] 1 fifo=00000005 tran=00000000
[   11.940278] 2 fifo=00000005 tran=00010004
[   11.952587] 2 fifo=00000001 tran=00000004
[   11.964900] 3 fifo=00000001 tran=00000004
[   11.977197] 3 fifo=00000005 tran=00000004
[   11.990167] ka2000_mmc_buf_tran_finish_irq 0 00000001
[   12.005946] ka2000_mmc_dma_irq 0 00000c00 00000002 01027e40 00000008 00000033
[   12.027763] cmd status=0 data status=0
[   12.041404] ka2000_mmc_start_command 0 opcode=0037 arg=b3680000 flags=00000095
[   12.064227] ka2000_mmc_cmd_done_irq 0 00000004 status=00000c00
[   12.083874] ka2000_mmc_start_command 0 opcode=000d arg=00000000 flags=000001b5
[   12.106542] *** data read command! block_reg=00400001 ***
[   12.123841] ka2000_mmc_cmd_done_irq 0 00000006 status=00000c00
[   12.141980] ka2000_mmc_tran_done_irq 0 00000002 status=00000c00 blocks=00400001
[   12.164272] 1 fifo=00000005 tran=00000004
[   12.176584] 2 fifo=00000005 tran=00010004
[   12.188891] 2 fifo=00000001 tran=00000004
[   12.201201] 3 fifo=00000001 tran=00000004
[   12.213508] 3 fifo=00000005 tran=00000004
[   12.226496] ka2000_mmc_buf_tran_finish_irq 0 00000001
[   12.242278] ka2000_mmc_dma_irq 0 00000c00 00000002 019f1c60 00000040 00000033
[   12.264093] cmd status=0 data status=0
[   12.277857] ka2000_mmc_start_command 0 opcode=0006 arg=00fffff0 flags=000000b5
[   12.300595] *** data read command! block_reg=00400001 ***
[   12.317892] ka2000_mmc_cmd_done_irq 0 00000004 status=00008800
[   12.336035] ka2000_mmc_tran_done_irq 0 00000002 status=00000c00 blocks=00400001
[   12.358293] 1 fifo=00000005 tran=00000004
[   12.370614] 2 fifo=00000005 tran=00010004
[   12.382914] 2 fifo=00000001 tran=00000004
[   12.395215] 3 fifo=00000001 tran=00000004
[   12.407507] 3 fifo=00000005 tran=00000004
[   12.420500] ka2000_mmc_buf_tran_finish_irq 0 00000001
[   12.436274] ka2000_mmc_dma_irq 0 00000c00 00000002 019f1c60 00000040 00000033
[   12.458081] cmd status=0 data status=0
[   12.471238] ka2000_mmc_set_ios (24000KHz, width=0)
[   12.486879] mmc0: new SDHC card at address b368
[   12.791287] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[   12.810403] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[   12.871714] msgmni has been set to 37
[   12.902137] mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
[   12.923950] ka2000_mmc_start_command 1 opcode=0034 arg=00000c00 flags=00000195
[   12.946801] ka2000_mmc_cmd_done_irq 1 00000014 status=00000c00
[   12.967048] ka2000_mmc_start_command 1 opcode=0034 arg=80000c08 flags=00000195
[   12.989848] ka2000_mmc_cmd_done_irq 1 00000014 status=00000c00
[   13.009152] ka2000_mmc_set_ios (400KHz, width=0)
[   13.116984] ka2000_mmc_start_command 1 opcode=0000 arg=00000000 flags=000000c0
[   13.139895] ka2000_mmc_cmd_done_irq 1 00000004 status=00000c00
[   13.208015] io scheduler noop registered
[   13.221220] io scheduler deadline registered (default)
[   13.295375] ka2000_mmc_set_ios (400KHz, width=0)
[   13.322423] ka2000_mmc_start_command 1 opcode=0008 arg=000001aa flags=000002f5
[   13.345473] ka2000_mmc_cmd_done_irq 1 00000014 status=00000c00
[   13.365017] ka2000_mmc_start_command 1 opcode=0005 arg=00000000 flags=000002e1
[   13.387790] ka2000_mmc_cmd_done_irq 1 00000014 status=00000c00
[   13.406741] ka2000_mmc_start_command 1 opcode=0005 arg=00000000 flags=000002e1
[   13.429437] ka2000_mmc_cmd_done_irq 1 00000014 status=00000c00
[   13.448362] ka2000_mmc_start_command 1 opcode=0005 arg=00000000 flags=000002e1
[   13.471070] ka2000_mmc_cmd_done_irq 1 00000014 status=00000c00
[   13.489968] ka2000_mmc_start_command 1 opcode=0005 arg=00000000 flags=000002e1
[   13.512682] ka2000_mmc_cmd_done_irq 1 00000014 status=00000c00
[   13.532109] ka2000_mmc_start_command 1 opcode=0037 arg=00000000 flags=000000f5
[   13.554849] ka2000_mmc_cmd_done_irq 1 00000014 status=00000c00
[   13.574250] ka2000_mmc_start_command 1 opcode=0037 arg=00000000 flags=000000f5
[   13.597006] ka2000_mmc_cmd_done_irq 1 00000014 status=00000c00
[   13.616774] ka2000_mmc_start_command 1 opcode=0037 arg=00000000 flags=000000f5
[   13.639524] ka2000_mmc_cmd_done_irq 1 00000014 status=00000c00
[   13.658979] ka2000_mmc_start_command 1 opcode=0037 arg=00000000 flags=000000f5
[   13.682159] ka2000_mmc_cmd_done_irq 1 00000014 status=00000c00
[   13.701562] ka2000_mmc_set_ios (400KHz, width=0)
[   13.716788] ka2000_mmc_start_command 1 opcode=0001 arg=00000000 flags=000000e1
[   13.739521] ka2000_mmc_cmd_done_irq 1 00000014 status=00000c00
[   13.758810] ka2000_mmc_set_ios (0KHz, width=0)
[   13.777449] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[   13.893670] serial8250.0: ttyS0 at MMIO 0xa0004000 (irq = 1) is a 8250
[   13.916912] console [ttyS0] enabled, bootconsole disabled
[   13.916912] console [ttyS0] enabled, bootconsole disabled
[   14.141086] ka2000_ssp_spi_txrx_mode0 9f 8: 00
[   14.157920] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[   14.174862] Creating 5 MTD partitions on "mx25l6405d":
[   14.192337] 0x000000080000-0x000000200000 : "rootfs"
[   14.334683] 0x000000200000-0x000000500000 : "kernel"
[   14.463055] 0x000000500000-0x000000800000 : "Ramdisk"
[   14.592127] 0x000000080000-0x000000800000 : "JFFS2_Kernel_RFS"
[   14.724588] 0x000000200000-0x000000800000 : "Kernel_RFS"
[   14.955581] cpuidle: using governor ladder
[   14.972058] cpuidle: using governor menu
[   14.997186] blk_limits_max_hw_sectors: set to minimum 8
[   15.020515] mmcblk0: mmc0:b368 SDC   15.0 GiB 
[   15.101858] ka2000_mmc_start_command 0 opcode=0011 arg=00000000 flags=000000b5
[   15.124588] *** data read command! block_reg=02000001 ***
[   15.141732] ka2000_mmc_cmd_done_irq 0 00000004 status=00008c00
[   15.159672] ka2000_mmc_tran_done_irq 0 00000002 status=00000c00 blocks=02000001
[   15.181715] 1 fifo=00000005 tran=00000004
[   15.193816] 2 fifo=00000005 tran=00010004
[   15.205890] 2 fifo=00000009 tran=00010004
[   15.217968] 3 fifo=00000009 tran=00010004
[   15.230019] 3 fifo=00000005 tran=00000004
[   15.242877] ka2000_mmc_buf_tran_finish_irq 0 00000001
[   15.258454] ka2000_mmc_dma_irq 0 00000c00 00000002 00e32000 00000200 00000033
[   15.280064] cmd status=0 data status=0
[   15.297405] ka2000_mmc_start_command 0 opcode=0011 arg=00000001 flags=000000b5
[   15.320007] *** data read command! block_reg=02000001 ***
[   15.337120] ka2000_mmc_cmd_done_irq 0 00000004 status=00008c00
[   15.355054] ka2000_mmc_tran_done_irq 0 00000002 status=00000c00 blocks=02000001
[   15.377098] 1 fifo=00000005 tran=00000004
[   15.389186] 2 fifo=00000005 tran=00010004
[   15.401249] 2 fifo=00000009 tran=00010004
[   15.413327] 3 fifo=00000009 tran=00010004
[   15.425387] 3 fifo=00000005 tran=00000004
[   15.438176] ka2000_mmc_buf_tran_finish_irq 0 00000001
[   15.453764] ka2000_mmc_dma_irq 0 00000c00 00000002 00e32200 00000200 00000033
[   15.475335] cmd status=0 data status=0
[   15.488744] ka2000_mmc_start_command 0 opcode=0011 arg=00000002 flags=000000b5
[   15.511257] *** data read command! block_reg=02000001 ***
[   15.528383] ka2000_mmc_cmd_done_irq 0 00000004 status=00008c00
[   15.546321] ka2000_mmc_tran_done_irq 0 00000002 status=00000c00 blocks=02000001
[   15.568366] 1 fifo=00000005 tran=00000004
[   15.580445] 2 fifo=00000005 tran=00010004
[   15.592511] 2 fifo=00000009 tran=00010004
[   15.604589] 3 fifo=00000009 tran=00010004
[   15.616645] 3 fifo=00000005 tran=00000004
[   15.629400] ka2000_mmc_buf_tran_finish_irq 0 00000001
[   15.644935] ka2000_mmc_dma_irq 0 00000c00 00000002 00e32400 00000200 00000033
[   15.666516] cmd status=0 data status=0
[   15.679870] ka2000_mmc_start_command 0 opcode=0011 arg=00000003 flags=000000b5
[   15.702391] *** data read command! block_reg=02000001 ***
[   15.719518] ka2000_mmc_cmd_done_irq 0 00000004 status=00008c00
[   15.737439] ka2000_mmc_tran_done_irq 0 00000002 status=00000c00 blocks=02000001
[   15.759472] 1 fifo=00000005 tran=00000004
[   15.771542] 2 fifo=00000005 tran=00010004
[   15.783603] 2 fifo=00000009 tran=00010004
[   15.795671] 3 fifo=00000009 tran=00010004
[   15.807731] 3 fifo=00000005 tran=00000004
[   15.820502] ka2000_mmc_buf_tran_finish_irq 0 00000001
[   15.836051] ka2000_mmc_dma_irq 0 00000c00 00000002 00e32600 00000200 00000033
[   15.857613] cmd status=0 data status=0
[   15.870991] ka2000_mmc_start_command 0 opcode=0011 arg=00000004 flags=000000b5
[   15.893505] *** data read command! block_reg=02000001 ***
[   15.910601] ka2000_mmc_cmd_done_irq 0 00000004 status=00008c00
[   15.928510] ka2000_mmc_tran_done_irq 0 00000002 status=00000c00 blocks=02000001
[   15.950557] 1 fifo=00000005 tran=00000004
[   15.962626] 2 fifo=00000005 tran=00010004
[   15.974694] 2 fifo=00000009 tran=00010004
[   15.986778] 3 fifo=00000009 tran=00010004
[   15.998834] 3 fifo=00000005 tran=00000004
[   16.011575] ka2000_mmc_buf_tran_finish_irq 0 00000001
[   16.027129] ka2000_mmc_dma_irq 0 00000c00 00000002 00e32800 00000200 00000033
[   16.048702] cmd status=0 data status=0
[   16.062106] ka2000_mmc_start_command 0 opcode=0011 arg=00000005 flags=000000b5
[   16.084626] *** data read command! block_reg=02000001 ***
[   16.101714] ka2000_mmc_cmd_done_irq 0 00000004 status=00008c00
[   16.119639] ka2000_mmc_tran_done_irq 0 00000002 status=00000c00 blocks=02000001
[   16.141692] 1 fifo=00000005 tran=00000004
[   16.153783] 2 fifo=00000005 tran=00010004
[   16.165866] 2 fifo=00000009 tran=00010004
[   16.177956] 3 fifo=00000009 tran=00010004
[   16.190018] 3 fifo=00000005 tran=00000004
[   16.202808] ka2000_mmc_buf_tran_finish_irq 0 00000001
[   16.218371] ka2000_mmc_dma_irq 0 00000c00 00000002 00e32a00 00000200 00000033
[   16.239948] cmd status=0 data status=0
[   16.253344] ka2000_mmc_start_command 0 opcode=0011 arg=00000006 flags=000000b5
[   16.276217] *** data read command! block_reg=02000001 ***
[   16.293324] ka2000_mmc_cmd_done_irq 0 00000004 status=00008c00
[   16.311243] ka2000_mmc_tran_done_irq 0 00000002 status=00000c00 blocks=02000001
[   16.333277] 1 fifo=00000005 tran=00000004
[   16.345356] 2 fifo=00000005 tran=00010004
[   16.357417] 2 fifo=00000009 tran=00010004
[   16.369497] 3 fifo=00000009 tran=00010004
[   16.381555] 3 fifo=00000005 tran=00000004
[   16.394328] ka2000_mmc_buf_tran_finish_irq 0 00000001
[   16.409890] ka2000_mmc_dma_irq 0 00000c00 00000002 00e32c00 00000200 00000033
[   16.431450] cmd status=0 data status=0
[   16.444853] ka2000_mmc_start_command 0 opcode=0011 arg=00000007 flags=000000b5
[   16.467391] *** data read command! block_reg=02000001 ***
[   16.484470] ka2000_mmc_cmd_done_irq 0 00000004 status=00008c00
[   16.502363] ka2000_mmc_tran_done_irq 0 00000002 status=00000c00 blocks=02000001
[   16.524391] 1 fifo=00000005 tran=00000004
[   16.536479] 2 fifo=00000005 tran=00010004
[   16.548554] 2 fifo=00000009 tran=00010004
[   16.560643] 3 fifo=00000009 tran=00010004
[   16.572700] 3 fifo=00000005 tran=00000004
[   16.585431] ka2000_mmc_buf_tran_finish_irq 0 00000001
[   16.600962] ka2000_mmc_dma_irq 0 00000c00 00000002 00e32e00 00000200 00000033
[   16.622532] cmd status=0 data status=0
[   16.639476]  mmcblk0: p1
[   16.729660] TCP: cubic registered
[   16.741032] NET: Registered protocol family 17
[   16.757377] 8021q: 802.1Q VLAN Support v1.8
[   16.865386] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[   17.264525] Freeing unused kernel memory: 3244K (c035c000 - c0687000)


BusyBox v1.19.4 (2013-09-03 01:40:05 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/ash: can't access tty; job control turned off
/ # 

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

moroboshi, you did a great job so far! Supporting last kernel is almost a reality thanks to your hard work. Please keep posting your progression smile

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

thepsy wrote:

moroboshi, you did a great job so far! Supporting last kernel is almost a reality thanks to your hard work. Please keep posting your progression smile

The caveat is that as-is so far this in no way supports the original use:

A _lot_ more work would be needed to reverse-engineer the buildtin sd-switch block and to implement the hacks that allow two systems to access the card at the same time.

But if you want to use this standalone to connect it via serial to a microcontroller project, for wifi remote control and data logging to the sd, then it should be usable for that as soon as I can get sd writes to work reliably. wink

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

hi guys, i need help

i need to have the card's wifi capabilities active whilst in a PC, i have the need to save files to it from the pc then copy them off using ftp/smb through the wifi.

is this possible. if so please help me

thanks

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

Excellent work from Dmitry Grinsburg (featured on Hack a day)

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

If I understand well all these are based on KeyASIC Ka2000 EVM, does it have internal memory? how much? rootfs is on a separate chip?

In the case of the PQI device I guess the rootfs can't be in the SD card as user can insert any micro-sd into it.

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

Done on a PQI AirCard :

# cat /proc/meminfo 
MemTotal:          29824 kB
MemFree:           17104 kB
[...]
# cat /proc/iomem
00000000-01ffffff : System RAM
  0021a000-00478fff : Kernel text
  0047a000-004aa2f7 : Kernel data
a0001000-a0001fff : spi_KeyAsic_ssi.0
a0004000-a00040ff : serial_ka2000
a0009000-a00090ff : KeyAsic_sdhci.1
  a0009000-a00090ff : mmc1
a000b000-a000bfff : ka_sdmmc
  a000b000-a000bfff : ka_sdmmc
# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00010000 "SPI NOR Flash Partition1"
mtd1: 00300000 00010000 "SPI: kernel"
mtd2: 00300000 00010000 "Ramdisk"
# cat /proc/partitions 
major minor  #blocks  name

 179        0   15659008 mmcblk0
 179        1   15654912 mmcblk0p1
# cat /proc/mounts 
rootfs / rootfs rw 0 0
proc /proc proc rw,relatime 0 0
/dev/mtdblock0 /mnt/mtd jffs2 rw,relatime 0 0
/dev/mmcblk0p1 /mnt/sd vfat rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=utf8,shortname=winnt,errors=remount-ro 0 0
none /dev/pts devpts rw,relatime,mode=622 0 0

==================================

What I deduce from that (and where I can be wrong) :

- 32MB of onboard RAM, of which 3MB is used as Ramdisk ( rootfs ? )
- 4MB SPI of onboard NOR Flash, 1MB used for the jffs2 ( /dev/mtdblock0 ), 3MB for the kernel
- 16GB of flash from my µSD card, with one vfat partition ( /dev/mmcblk0p )

So the 3MB limit of u-boot doesn't seem to be a software-only limit, but we could maybe use the availble ressources differently (now that, thanks to Dmitry Grinberg we have the u-boot source from Transcend)

I haven't got my second AirCard and don't want to risk my perfectly working one to probe the test points. The Aircards seem increasingly difficult to find (probably because PQI is working on the Model II and there is not much stock). I tried a second ebay seller (the packagfe of the first one never arrived...) and if I get it, I'll open the case and make some high-res photo of it.

For me the AirCar is more reliable than the WifiSD  (the AirCar wifi connection stays up, when the WifiSD's cuts even at 10cm from the AP and with wifi timeout disabled), but it may have to do with the fact that I already put my hands into the WifiSD package wink.

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

pixelk: Not quite right:

- 32MB of onboard RAM, of which 3MB is used as Ramdisk ( stores the rootfs only at runtime )
- 7MB of onboard NOR Flash, 1MB used for the jffs2 ( /dev/mtdblock0 ), 3MB for the kernel, and 3MB to persistently store the rootfs
- 16GB of flash from my µSD card, with one vfat partition ( /dev/mmcblk0p )

The kernel makes a ramdisk during boot, takes the initrd (which holds the rootfs) from /dev/mtdblock2, and copies it into the ram disk, mounts it as /, and runs /init. This behavior is triggered by the bootloader (uboot).

If you want to change that behavior, including the layout of that 7MB NOR, you'll need to make changes to the bootloader. I don't think anyone has successfully done that yet, but Trancend has posted their uboot sources here if you want to make the attempt. Careful - the bootloader is currently the only thing between you and a bricked device, since it's also responsible for doing software updates.

71 (edited by pixelk 2013-09-24 16:34:56)

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

Thank you for the correction dankrause. 7MB didn't felt "right" in these binary world, but that's way ahead of my level of expertise. For the same reason I won't go into compiling my own u-boot, as it saved me many times from bricking my cards. The only thing I did successfully on my own so far is  modify the stock firmware to bend them to my will. I wasn't even able to create a toolchain to compile non statically linked binary even when epdtry explained how.
So for the moment, I'll let the expert try to split the atom and watch their progress as closely as I can without getting radiation poisoning smile

On my "trying to cut the cheese in half" side, just if it is of any interest to anyone, here is my recipe to modify the stock firmware (any one of the firmware) which puts together every post and webpages I've cited here :

I'm working on a freshly installed Ubuntu 12.04 LTS, with up to date packages.

First go root (you'll need later), some people prefer fakeroot, but I'm using a spare computer here, so I don't really care :

sudo su -

Get into the stock firmware folder, which contains initramfs3.gz and a 'newroot' sub-folder, containing the directory tree of all the modified files you want in your new firmware


Extract the stock firmware

echo Remove last working directory
rm -rf working

echo Prepare the working directory
mkdir working

echo Cut the 8 byte of file header to a new file
tail -c+9 initramfs3.gz > initramfs.gz

echo Extract from file
gunzip initramfs.gz

echo Change to the working Dir
cd working
sleep 1

echo Expand the file to the current directory
cpio -i < ../initramfs

rm ../initramfs

Now the alterations, I start by removing all the non-working symbolic links to the stock busybox (because those tools weren't compiled within it) and then do some dust cleaning

echo Remove broken BusyBox links
rm -f ../working/bin/chown
rm -f ../working/bin/ipaddr
rm -f ../working/bin/powertop
rm -f ../working/bin/vi
rm -f ../working/sbin/modinfo
rm -f ../working/sbin/modprobe
rm -f ../working/usr/bin/clear
rm -f ../working/usr/bin/du
rm -f ../working/usr/bin/ftpput
rm -f ../working/usr/bin/md5sum
rm -f ../working/usr/bin/printf
rm -f ../working/usr/bin/renice
rm -f ../working/usr/bin/telnet
rm -f ../working/usr/bin/top
rm -f ../working/usr/bin/tr
rm -f ../working/usr/bin/udpsvd
rm -f ../working/usr/bin/uptime
rm -f ../working/usr/sbin/ntpd

echo Remove unused files
rm -f ../working/home/sd/DCIM/199_WIFI/Movie.JPG
rm -f ../working/usr/bin/restore_all_control_images.sh
rm -f ../working/usr/bin/copy_control_images_to_nor.sh

(noticed the  ../working/, it's just to make sure I don't do anything stupid while I'm root)

Then copy the new files and adjust the ownership and permissions (the only user available in the KCards is 0 - root)

cp -Rf ../newroot/* ../working

chown -R root:root ../working/

chmod -R a+rwx ../working/
chmod -R 0700 ../working/root
chmod 0600 ../working/root/.ssh/authorized_keys

Build the new firmware image

echo Make the initramfs3 update file
find ./ | cpio --create --format='newc' | gzip -v -9 > ../initramfs3-tmp.gz

size_str=$(ls -al ../initramfs3-tmp.gz | cut -d " " -f 5)
if [[ $size_str -gt 3145728 ]] ; then
    echo "Sorry, the image size is too big for the factory u-boot"
    exit
fi

echo Generate new file Header
printf KAGZabcd | tr dcba $(du -b ../initramfs3-tmp.gz | awk '{for (b = 0; b < 4; b++) {printf "\\%o", $1 % 256; $1 /= 256}}') > ../initramfs3-tmp.header

echo Glue everything together
cat ../initramfs3-tmp.header ../initramfs3-tmp.gz > ../my_initramfs3.gz
rm ../initramfs3-tmp.header ../initramfs3-tmp.gz

echo Done.

now you can copy my_initramfs3.gz to the root of the SD card, rename it to initramfs3.gz, with the original Image3, mtd_jffs2.bin and program.bin

I also made myself a custom mtd_jffs2.bin to be able to get my settings on the first boot without the need to log onto the card remotely.

Practically none of this is my own work, so thanks go to the original authors of those.

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

I'm working on a build environment with buildroot right now. I'm not yet successful, but I'll post my buildroot / busybox / uClibc configs when I am, and some instructions on setting it up on Ubuntu. My intent is to entirely replace the initrd, including the web UI. I have a PQI Aircard. I intend on replacing it's discovery method to that of the Trancend card as well.

The 7MB is most likely due to the vendor not needing the full amount of available NOR, and reserving the rest for spare blocks. When a block fails on a flash chip, the chip can automatically start using a spare block in it's place. If you have a bunch of spare blocks, your flash chip will last longer than it otherwise would. Here's some info on how that works.

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

That will be very interesting !
For the discovery, I use a combination of this in /etc/init.d/rcS

if [ -f /mnt/sd/MISC/bin/busybox ]
then
    echo "run Identity service"
    chmod 777 /mnt/sd/MISC/bin/busybox
    /mnt/sd/MISC/bin/busybox udpsvd 0 55777 /usr/bin/idService &
    
    /usr/bin/busybox-install.sh
fi

and in /usr/bin/idService :

#!/bin/sh

net=`/mnt/sd/MISC/bin/busybox ipaddr show mlan0`
echo "PQI AirCard - $net"

I didn't think about NOR provisioning, thank you for the hint.

74 (edited by cnlohr 2013-09-26 22:11:51)

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

I am getting stuck - when my card boots, I get the following:

If the card is selected by the host on boot, I get this:

KA Boot 04240806
scu: 11c33303,00000000,00040404,00009f00,1
Status 201a0806

Hit to stop :  0
Status 20200804
RCA0 68, RCA1 b3
reading program.bin
Error: reading boot sector
<mmc1>go 208000

If not, I get this:

Hit to stop :  0
Wait m1 timeout - Status 20200803 RCA0 68, RCA1 b3
(5)m1 not readyStatus 20200803
InitCard failed
** Can't read from device 1 **
** Can't read from device 1 **
reading program.bin
Error: reading boot sector
<49.rf 65280><48.rf 65280><47.rf 65280><46.rf 65280><45.rf 65280><44.rf 65280><43.rf 65280><42.rf 65280><41.rf 65280><40.rf 65280><39.rf 65280><38.rf 65280><37.rf 65280><36.rf 65280><35.rf 65280><34.rf 65280><33.rf 65280><32.rf 65280><31.rf 65280><30.rf 65280><29.rf 65280><28.rf 65280><27.rf 65280><26.rf 65280><25.rf 65280><24.rf 65280><23.rf 65280><22.rf 65280><21.rf 65280><20.rf 65280><19.rf 65280><18.rf 65280><17.rf 65280><16.rf 65280><15.rf 65280><14.rf 65280><13.rf 65280><12.rf 65280><11.rf 65280><10.rf 65280><9.rf 65280><8.rf 65280>

Also, I ripped off the debug point, so I had to scrape up some trace and contact to that.  Needless to say this is a painful process now.

75 (edited by cnlohr 2013-09-28 04:06:41)

Re: Transcend WifiSD / PQI AirCard / FluCard Pro

I hate double-posting but my situation has changed substantially.  I have soldered on more things to my card so I can do KA2000 debugging.  When I boot the card, after externally initializing the card with my stack, I get the following:


(SNIP)
[    5.630000] mmc0: card lacks mandatory switch function, performance might suffer.
[    5.650000] bw = 22
[    5.670000] mmc0: new SD card at address 66d0
[    9.690000] pwm set 0
[    9.700000] pwm set 17432676
[    9.710000] pwm set 17432577
[    9.720000] pwm set 17432676
[    9.730000] pwm set 17432968
[    9.740000] pwm set 17432676
[    9.750000] pwm set 17432577
[    9.760000] pwm set 16842753
[   11.760000] sdio wakeup
[   11.840000] mmc1: queuing CIS tuple 0x01 length 3
[   11.840000] mmc1: queuing CIS tuple 0x1a length 5
[   11.840000] mmc1: queuing CIS tuple 0x1b length 8
[   11.840000] mmc1: queuing CIS tuple 0x14 length 0
[   11.840000] mmc1: queuing CIS tuple 0x80 length 1
[   11.840000] mmc1: queuing CIS tuple 0x81 length 1
[   11.840000] mmc1: queuing CIS tuple 0x82 length 1
[   11.840000] mmc1: new SDIO card at address 0001
[   11.920000] AR6000: configuration opcode 7 is only used for RTOS systems, not Linux systems
[   12.060000] ath6k/AR6003/hw2.1.1/athwlan.bin firmware will be loaded
[   12.760000] AR6K: ** HIF layer does not support scatter requests (17) 
[   12.810000] wmi_control_rx() : Unknown id 0x101e
[   20.190000] Add Filter 0 = 01:00:5e:00:00:01
[   20.210000] Keep Filter 0 = 01:00:5e:00:00:01
[   20.220000] Keep Filter 0 = 01:00:5e:00:00:01
[   26.540000] (0>1)L886,C17,sderr(2):0:1,20200804:20200804,err: 0x608c00 (2)
[   26.920000] ReadSingle failed! (r 0,11c26603:0:101010) L886,C17,sderr(2):0:1,20200804:20200804,err: 0x608c00 (2)
[   26.960000] L886,C17,sderr(2):0:1,20200804:20200804,err: 0x608c00 (2)
[   27.000000] L886,C17,sderr(2):0:1,20200804:20200804,err: 0x608c00 (2)
[   27.030000] L886,C17,sderr(2):0:1,20200804:20200804,err: 0x608c00 (2)
[   27.060000] ReadSingle failed! (r 1,11c26603:0:101010) L886,C17,sderr(2):0:1,20200804:20200804,err: 0x608c00 (2)
[   27.090000] L886,C17,sderr(2):0:1,20200804:20200804,err: 0x608c00 (2)
[   27.120000] L886,C17,sderr(2):0:1,20200804:20200804,err: 0x608c00 (2)
[   27.150000] L886,C17,sderr(2):0:1,20200804:20200804,err: 0x608c00 (2)
[   27.180000] ReadSingle failed! (r 2,11c26603:0:101010) L886,C17,sderr(2):0:1,14070005:20200804,err: 0x608c00 (2)
[   27.290000] +20200805 :s17:1e0a6e1
[   27.310000] L468,C17,sderr(4):0:1,20200804:20200004,err: 0x18c00 (4)
[   27.340000] SDHC: HCmdNoData(): CMD17: flag=1117911h, arg=2h failed
[   52.980000] 
[   52.980000] sw:1,m2:20170807: 1021080:0:0:0, 544, deselect_m2 timeout
[   53.010000] sw c12:0 (2-1)c12:20170807,1021080 deselect_m1 timeout
[   82.080000] 
[   82.080000] sw:1,m1:7,m2:1:20170807: 1000000:0:0:0, 544, deselect_m2 timeout(7:1):s17:1e0a6e1
[   89.780000] L886,C17,sderr(2):0:1,20200804:20200804,err: 0x608c00 (2)
[   89.810000] bomb reg 0 - 0
[   89.830000] (1>0)pwm set 0
[   89.960000] pwm set 17432676
[   89.970000] pwm set 17432577
[   89.980000] pwm set 17432676
[   89.990000] pwm set 17432968
[   90.000000] pwm set 17432676
[   90.010000] pwm set 17432577
[   90.020000] pwm set 16842753
[   90.030000] pwm timer active!
[  128.200000] L886,C17,sderr(2):0:1,20200804:20200804,err: 0x608c00 (2)
[  128.230000] ReadSingle failed! (r 0,11c26603:0:101010) L886,C17,sderr(2):0:1,20200804:20200804,err: 0x608c00 (2)
[  128.260000] L886,C17,sderr(2):0:1,20200804:20200804,err: 0x608c00 (2)
[  128.290000] L886,C17,sderr(2):0:1,20200804:20200804,err: 0x608c00 (2)
[  128.320000] L886,C17,sderr(2):0:1,20200804:20200804,err: 0x608c00 (2)
[  128.350000] ReadSingle failed! (r 1,11c26603:0:101010) L886,C17,sderr(2):0:1,20200804:20200804,err: 0x608c00 (2)
[  128.410000] +20170807 :s24:1e0a6e1
[  128.430000] L886,C17,sderr(2):0:1,20200804:20200804,err: 0x608c00 (2)
[  128.460000] +14070005 :s17:1e0a6e1
[  128.480000] L468,C17,sderr(4):0:1,20200804:20200004,err: 0x18c00 (4)
[  128.510000] SDHC: HCmdNoData(): CMD17: flag=1117911h, arg=1h failed
[  154.150000] 
[  154.150000] sw:0,m2:20170807: 1021080:0:0:0, 544, deselect_m2 timeout
[  154.170000] sw c12:0 (2-1)c12:14170007,1021080 deselect_m1 timeout
[  183.080000] 
[  183.080000] sw:0,m1:7,m2:1:20170807: 1000000:0:0:0, 544, deselect_m2 timeout(7:1):s17:1e0a6e1
[  183.500000] L886,C17,sderr(2):0:1,201a0806:20060804,err: 0x608c00 (2)
[  209.160000] 
[  209.160000] sw:0,m2:20170807: 1021080:0:0:0, 544, deselect_m2 timeout
(Errors continue when trying to talk to the card)

My external controller has no issues reading/writing to/from the card in SD mode.

Any ideas what could be going on that my initialization of the card could be that terrible?

*EDIT* P.S.

Between these few lines here communication between the SD card and the host fails.

[  136.030000] SDHC: HCmdNoData(): CMD17: flag=1117911h, arg=2h failed
[  161.670000] 
[  161.670000] sw:4,m2:20170807: 1021080:0:0:0, 544, deselect_m2 timeout
[  161.690000] sw c12:0 (2-1)c12:20170807,1021080 deselect_m1 timeout
[  190.600000] 
[  190.600000] sw:4,m1:7,m2:1:20170807: 1000000:0:0:0, 544, deselect_m2 timeout(7:1):s17:1e0a6e1
[  190.990000] L886,C17,sderr(2):0:1,201a0806:20200804,err: 0x608c00 (2)

but it comes right back.