mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 13:43:28 +00:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
89 lines
1.4 KiB
C
89 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* ifdtool - Manage Intel Firmware Descriptor information
|
|
*
|
|
* Copyright (C) 2011 The ChromiumOS Authors.
|
|
*
|
|
* From Coreboot project
|
|
*/
|
|
|
|
#include <stdint.h>
|
|
|
|
#define __packed __attribute__((packed))
|
|
|
|
#define IFDTOOL_VERSION "1.1-U-Boot"
|
|
|
|
#define WRITE_MAX 16
|
|
|
|
enum spi_frequency {
|
|
SPI_FREQUENCY_20MHZ = 0,
|
|
SPI_FREQUENCY_33MHZ = 1,
|
|
SPI_FREQUENCY_50MHZ = 4,
|
|
};
|
|
|
|
enum component_density {
|
|
COMPONENT_DENSITY_512KB = 0,
|
|
COMPONENT_DENSITY_1MB = 1,
|
|
COMPONENT_DENSITY_2MB = 2,
|
|
COMPONENT_DENSITY_4MB = 3,
|
|
COMPONENT_DENSITY_8MB = 4,
|
|
COMPONENT_DENSITY_16MB = 5,
|
|
};
|
|
|
|
/* flash descriptor */
|
|
struct __packed fdbar_t {
|
|
uint32_t flvalsig;
|
|
uint32_t flmap0;
|
|
uint32_t flmap1;
|
|
uint32_t flmap2;
|
|
uint8_t reserved[0xefc - 0x20];
|
|
uint32_t flumap1;
|
|
};
|
|
|
|
#define MAX_REGIONS 5
|
|
|
|
/* regions */
|
|
struct __packed frba_t {
|
|
uint32_t flreg[MAX_REGIONS];
|
|
};
|
|
|
|
/* component section */
|
|
struct __packed fcba_t {
|
|
uint32_t flcomp;
|
|
uint32_t flill;
|
|
uint32_t flpb;
|
|
};
|
|
|
|
#define MAX_STRAPS 18
|
|
|
|
/* pch strap */
|
|
struct __packed fpsba_t {
|
|
uint32_t pchstrp[MAX_STRAPS];
|
|
};
|
|
|
|
/* master */
|
|
struct __packed fmba_t {
|
|
uint32_t flmstr1;
|
|
uint32_t flmstr2;
|
|
uint32_t flmstr3;
|
|
};
|
|
|
|
/* processor strap */
|
|
struct __packed fmsba_t {
|
|
uint32_t data[8];
|
|
};
|
|
|
|
/* ME VSCC */
|
|
struct vscc_t {
|
|
uint32_t jid;
|
|
uint32_t vscc;
|
|
};
|
|
|
|
struct vtba_t {
|
|
/* Actual number of entries specified in vtl */
|
|
struct vscc_t entry[8];
|
|
};
|
|
|
|
struct region_t {
|
|
int base, limit, size;
|
|
};
|