This commit is contained in:
Andre Heider 2018-02-05 07:06:44 +01:00
parent a4222294ca
commit ee914ba760
4 changed files with 13 additions and 12 deletions

View file

@ -19,12 +19,12 @@
#include "cbfs_switch.h"
#define UINT32TOBUF(val, x, o) \
#define UINT32TOBUF(b, o, val) \
do { \
x[o + 0] = (val >> 24) & 0xff; \
x[o + 1] = (val >> 16) & 0xff; \
x[o + 2] = (val >> 8) & 0xff; \
x[o + 3] = val & 0xff; \
b[o + 0] = (val >> 24) & 0xff; \
b[o + 1] = (val >> 16) & 0xff; \
b[o + 2] = (val >> 8) & 0xff; \
b[o + 3] = val & 0xff; \
} while (0);
extern u8 _usb_bounce[];
@ -75,8 +75,8 @@ static ssize_t usb_readat(const struct region_device *rd, void *b,
size_t left = size;
size_t chunk;
UINT32TOBUF(offset, _usb_bounce, 0);
UINT32TOBUF(size, _usb_bounce, 4);
UINT32TOBUF(_usb_bounce, 0, offset);
UINT32TOBUF(_usb_bounce, 4, size);
rom_sendbuf(_usb_bounce, 8);
while (left > 0) {
@ -114,7 +114,7 @@ static bool rom_in_sdram = false;
void cbfs_switch_to_sdram(void)
{
usb_readat(NULL, _rom_copy, 0, CONFIG_ROM_SIZE);
usb_readat(&mdev_usb.rdev, _rom_copy, 0, CONFIG_ROM_SIZE);
memset(_usb_bounce, 0, 8);
rom_sendbuf(_usb_bounce, 8);

View file

@ -15,9 +15,10 @@
#include <arch/io.h>
#include <console/console.h>
#include <soc/addressmap.h>
#include <reset.h>
#define PMC_CTLR_BASE (void *)(0x7000e400)
#define PMC_CTLR_BASE ((void *)(TEGRA_PMC_BASE))
#define PMC_CNTRL 0x000
#define PMC_CNTRL_MAIN_RST (1 << 4)
#define PMC_SCRATCH0 0x050

View file

@ -16,6 +16,7 @@
#include <arch/io.h>
#include <console/console.h>
#include <soc/addressmap.h>
#include <soc/sdram_configs.h>
static const struct sdram_params sdram_configs[] = {
@ -26,7 +27,7 @@ static const struct sdram_params sdram_configs[] = {
#include "bct/sdram-nintendo-switch-4.inc" /* ram_code = 0100 */
};
#define TEGRA_FUSE_BASE ((void *) 0x7000f800)
#define TEGRA_FUSE_BASE ((void *)TEGRA_FUSE_BASE)
#define FUSE_RESERVED_ODM4 0x1d8
static uint32_t switch_sdram_get_id(void)

View file

@ -18,8 +18,7 @@ config SOC_NVIDIA_TEGRA210
if SOC_NVIDIA_TEGRA210
config BOOTBLOCK_WRAP_BCT
bool
default y
def_bool y
config VBOOT
select VBOOT_STARTS_IN_BOOTBLOCK