Sansa Connect: Initial TNETV105 driver port

Port USB driver from Sansa Connect Linux kernel sources. The device
successfully enumerates and responds to SCSI commands but actual disk
access does not work. The SCSI response sent to host mentions that both
internal storage and microsd card are not present.

Change-Id: Ic6c07da12382c15c0b069f23a75f7df9765b7525
This commit is contained in:
Tomasz Moń 2021-06-05 09:22:27 +02:00
parent 77603c344d
commit 474293a12b
11 changed files with 3066 additions and 60 deletions

View file

@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id: $
*
* Copyright (C) 2011 by Tomasz Moń
* Copyright (C) 2011-2021 by Tomasz Moń
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
@ -32,6 +32,7 @@
#include "uart-target.h"
#include "power.h"
#include "loader_strerror.h"
#include "usb.h"
#define FLASH_BASE 0x00100000
#define PARAMETERS_FLASH_OFFSET 0x00010000
@ -206,6 +207,8 @@ void main(void)
printf("Rockbox boot loader");
printf("Version %s", rbversion);
usb_init();
usb_start_monitoring();
clear_recoverzap();
@ -215,6 +218,17 @@ void main(void)
filesystem_init();
if (usb_detect() == USB_INSERTED)
{
usb_enable(true);
while (usb_detect() == USB_INSERTED)
{
sleep(HZ);
storage_spin();
}
usb_enable(false);
}
ret = disk_mount_all();
if (ret <= 0)
error(EDISK, ret, true);
@ -269,8 +283,8 @@ void main(void)
ret = kernel_entry();
printf("FAILED!");
}
storage_sleepnow();
while(1);
}