mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-12 22:49:43 +03:00
Compare commits
17 Commits
v2011.12-r
...
v2011.12-r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
901de79a37 | ||
|
|
6b62b9a31d | ||
|
|
10879aa21c | ||
|
|
d3f80c77ca | ||
|
|
a7b3918533 | ||
|
|
8b0affecb9 | ||
|
|
b2fb47f187 | ||
|
|
ddc7e541ae | ||
|
|
d70a560fd7 | ||
|
|
cf9f95f293 | ||
|
|
4256101f8c | ||
|
|
1113a79b2a | ||
|
|
509adc8b77 | ||
|
|
06e42c6e2c | ||
|
|
c4df214901 | ||
|
|
0160c1e1a3 | ||
|
|
52b2601696 |
2
Makefile
2
Makefile
@@ -24,7 +24,7 @@
|
||||
VERSION = 2011
|
||||
PATCHLEVEL = 12
|
||||
SUBLEVEL =
|
||||
EXTRAVERSION = -rc1
|
||||
EXTRAVERSION = -rc2
|
||||
ifneq "$(SUBLEVEL)" ""
|
||||
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
|
||||
else
|
||||
|
||||
8
README
8
README
@@ -1185,6 +1185,14 @@ The following options need to be configured:
|
||||
for your device
|
||||
- CONFIG_USBD_PRODUCTID 0xFFFF
|
||||
|
||||
- ULPI Layer Support:
|
||||
The ULPI (UTMI Low Pin (count) Interface) PHYs are supported via
|
||||
the generic ULPI layer. The generic layer accesses the ULPI PHY
|
||||
via the platform viewport, so you need both the genric layer and
|
||||
the viewport enabled. Currently only Chipidea/ARC based
|
||||
viewport is supported.
|
||||
To enable the ULPI layer support, define CONFIG_USB_ULPI and
|
||||
CONFIG_USB_ULPI_VIEWPORT in your board configuration file.
|
||||
|
||||
- MMC Support:
|
||||
The MMC controller on the Intel PXA is supported. To
|
||||
|
||||
@@ -123,4 +123,3 @@ struct lcd_sync_arg {
|
||||
void da8xx_video_init(const struct da8xx_panel *panel, int bits_pixel);
|
||||
|
||||
#endif /* ifndef DA8XX_FB_H */
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#define EXYNOS4_ADC_BASE 0x13910000
|
||||
#define EXYNOS4_PWMTIMER_BASE 0x139D0000
|
||||
#define EXYNOS4_MODEM_BASE 0x13A00000
|
||||
#define EXYNOS4_USBPHY_CONTROL 0x10020704
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#include <asm/io.h>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Freescale SerDes initialization routine
|
||||
*
|
||||
* Copyright (C) 2007 Freescale Semicondutor, Inc.
|
||||
* Copyright (C) 2007,2011 Freescale Semicondutor, Inc.
|
||||
* Copyright (C) 2008 MontaVista Software, Inc.
|
||||
*
|
||||
* Author: Li Yang <leoli@freescale.com>
|
||||
@@ -20,6 +20,10 @@
|
||||
/* SerDes registers */
|
||||
#define FSL_SRDSCR0_OFFS 0x0
|
||||
#define FSL_SRDSCR0_DPP_1V2 0x00008800
|
||||
#define FSL_SRDSCR0_TXEQA_MASK 0x00007000
|
||||
#define FSL_SRDSCR0_TXEQA_SATA 0x00001000
|
||||
#define FSL_SRDSCR0_TXEQE_MASK 0x00000700
|
||||
#define FSL_SRDSCR0_TXEQE_SATA 0x00000100
|
||||
#define FSL_SRDSCR1_OFFS 0x4
|
||||
#define FSL_SRDSCR1_PLLBW 0x00000040
|
||||
#define FSL_SRDSCR2_OFFS 0x8
|
||||
@@ -71,6 +75,11 @@ void fsl_setup_serdes(u32 offset, char proto, u32 rfcks, char vdd)
|
||||
tmp &= ~FSL_SRDSRSTCTL_SATA_RESET;
|
||||
out_be32(regs + FSL_SRDSRSTCTL_OFFS, tmp);
|
||||
|
||||
/* Configure SRDSCR0 */
|
||||
clrsetbits_be32(regs + FSL_SRDSCR0_OFFS,
|
||||
FSL_SRDSCR0_TXEQA_MASK | FSL_SRDSCR0_TXEQE_MASK,
|
||||
FSL_SRDSCR0_TXEQA_SATA | FSL_SRDSCR0_TXEQE_SATA);
|
||||
|
||||
/* Configure SRDSCR1 */
|
||||
tmp = in_be32(regs + FSL_SRDSCR1_OFFS);
|
||||
tmp &= ~FSL_SRDSCR1_PLLBW;
|
||||
|
||||
@@ -56,7 +56,7 @@ Boston, MA 02110-1301, USA. */
|
||||
!
|
||||
|
||||
.global __ashrsi3
|
||||
|
||||
|
||||
.align 2
|
||||
__ashrsi3:
|
||||
mov #31,r0
|
||||
|
||||
@@ -237,21 +237,28 @@ void lcd_show_board_info(void)
|
||||
|
||||
#endif /* CONFIG_LCD */
|
||||
|
||||
int board_init(void)
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
|
||||
/* Enable Ctrlc */
|
||||
console_init_f();
|
||||
|
||||
/* Enable clocks for some PIOs */
|
||||
writel(1 << ATMEL_ID_PIOA |
|
||||
1 << ATMEL_ID_PIOC,
|
||||
&pmc->pcer);
|
||||
|
||||
at91_seriald_hw_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
/* arch number of PM9261-Board */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_PM9261;
|
||||
|
||||
/* adress of boot parameters */
|
||||
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
|
||||
|
||||
at91_seriald_hw_init();
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
pm9261_nand_hw_init();
|
||||
#endif
|
||||
|
||||
@@ -336,22 +336,28 @@ void lcd_show_board_info(void)
|
||||
|
||||
#endif /* CONFIG_LCD */
|
||||
|
||||
int board_init(void)
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
|
||||
/* Enable Ctrlc */
|
||||
console_init_f();
|
||||
|
||||
writel((1 << ATMEL_ID_PIOA) |
|
||||
(1 << ATMEL_ID_PIOCDE) |
|
||||
(1 << ATMEL_ID_PIOB),
|
||||
/* Enable clocks for all PIOs */
|
||||
writel((1 << ATMEL_ID_PIOA) | (1 << ATMEL_ID_PIOB) |
|
||||
(1 << ATMEL_ID_PIOCDE),
|
||||
&pmc->pcer);
|
||||
|
||||
at91_seriald_hw_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
/* arch number of AT91SAM9263EK-Board */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_PM9263;
|
||||
|
||||
/* adress of boot parameters */
|
||||
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
|
||||
|
||||
at91_seriald_hw_init();
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
pm9263_nand_hw_init();
|
||||
#endif
|
||||
|
||||
@@ -127,22 +127,28 @@ static void pm9g45_macb_hw_init(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
int board_init(void)
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
|
||||
/* Enable Ctrlc */
|
||||
console_init_f();
|
||||
|
||||
/* Enable clocks for all PIOs */
|
||||
writel((1 << ATMEL_ID_PIOA) |
|
||||
(1 << ATMEL_ID_PIOB) |
|
||||
(1 << ATMEL_ID_PIOC) |
|
||||
(1 << ATMEL_ID_PIODE), &pmc->pcer);
|
||||
|
||||
at91_seriald_hw_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
/* arch number of AT91SAM9M10G45EK-Board */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_PM9G45;
|
||||
/* adress of boot parameters */
|
||||
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
|
||||
|
||||
at91_seriald_hw_init();
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
pm9g45_nand_hw_init();
|
||||
#endif
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/arch/mmc.h>
|
||||
#include <pmic.h>
|
||||
#include <usb/s3c_udc.h>
|
||||
#include <asm/arch/cpu.h>
|
||||
#include <max8998_pmic.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
@@ -253,3 +256,48 @@ int board_mmc_init(bd_t *bis)
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_GADGET
|
||||
static int s5pc210_phy_control(int on)
|
||||
{
|
||||
int ret;
|
||||
struct pmic *p = get_pmic();
|
||||
|
||||
if (pmic_probe(p))
|
||||
return -1;
|
||||
|
||||
if (on) {
|
||||
ret |= pmic_set_output(p,
|
||||
MAX8998_REG_BUCK_ACTIVE_DISCHARGE3,
|
||||
MAX8998_SAFEOUT1, LDO_ON);
|
||||
ret |= pmic_set_output(p, MAX8998_REG_ONOFF1,
|
||||
MAX8998_LDO3, LDO_ON);
|
||||
ret |= pmic_set_output(p, MAX8998_REG_ONOFF2,
|
||||
MAX8998_LDO8, LDO_ON);
|
||||
|
||||
} else {
|
||||
ret |= pmic_set_output(p, MAX8998_REG_ONOFF2,
|
||||
MAX8998_LDO8, LDO_OFF);
|
||||
ret |= pmic_set_output(p, MAX8998_REG_ONOFF1,
|
||||
MAX8998_LDO3, LDO_OFF);
|
||||
ret |= pmic_set_output(p,
|
||||
MAX8998_REG_BUCK_ACTIVE_DISCHARGE3,
|
||||
MAX8998_SAFEOUT1, LDO_OFF);
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
puts("MAX8998 LDO setting error!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct s3c_plat_otg_data s5pc210_otg_data = {
|
||||
.phy_control = s5pc210_phy_control,
|
||||
.regs_phy = EXYNOS4_USBPHY_BASE,
|
||||
.regs_otg = EXYNOS4_USBOTG_BASE,
|
||||
.usb_phy_ctrl = EXYNOS4_USBPHY_CONTROL,
|
||||
.usb_flags = PHY0_SLEEP,
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -868,7 +868,7 @@ static int do_env_import(cmd_tbl_t *cmdtp, int flag,
|
||||
printf("## Warning: Input data exceeds %d bytes"
|
||||
" - truncated\n", MAX_ENV_SIZE);
|
||||
}
|
||||
++size;
|
||||
size += 2;
|
||||
printf("## Info: input data size = %zu = 0x%zX\n", size, size);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/unaligned.h>
|
||||
#include <part.h>
|
||||
#include <usb.h>
|
||||
|
||||
@@ -240,7 +241,7 @@ void usb_display_ep_desc(struct usb_endpoint_descriptor *epdesc)
|
||||
printf("Interrupt");
|
||||
break;
|
||||
}
|
||||
printf(" MaxPacket %d", epdesc->wMaxPacketSize);
|
||||
printf(" MaxPacket %d", get_unaligned(&epdesc->wMaxPacketSize));
|
||||
if ((epdesc->bmAttributes & 0x03) == 0x3)
|
||||
printf(" Interval %dms", epdesc->bInterval);
|
||||
printf("\n");
|
||||
|
||||
27
common/usb.c
27
common/usb.c
@@ -49,6 +49,7 @@
|
||||
#include <asm/processor.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#include <usb.h>
|
||||
#ifdef CONFIG_4xx
|
||||
@@ -279,30 +280,32 @@ usb_set_maxpacket_ep(struct usb_device *dev, int if_idx, int ep_idx)
|
||||
{
|
||||
int b;
|
||||
struct usb_endpoint_descriptor *ep;
|
||||
u16 ep_wMaxPacketSize;
|
||||
|
||||
ep = &dev->config.if_desc[if_idx].ep_desc[ep_idx];
|
||||
|
||||
b = ep->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
|
||||
ep_wMaxPacketSize = get_unaligned(&ep->wMaxPacketSize);
|
||||
|
||||
if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
|
||||
USB_ENDPOINT_XFER_CONTROL) {
|
||||
/* Control => bidirectional */
|
||||
dev->epmaxpacketout[b] = ep->wMaxPacketSize;
|
||||
dev->epmaxpacketin[b] = ep->wMaxPacketSize;
|
||||
dev->epmaxpacketout[b] = ep_wMaxPacketSize;
|
||||
dev->epmaxpacketin[b] = ep_wMaxPacketSize;
|
||||
USB_PRINTF("##Control EP epmaxpacketout/in[%d] = %d\n",
|
||||
b, dev->epmaxpacketin[b]);
|
||||
} else {
|
||||
if ((ep->bEndpointAddress & 0x80) == 0) {
|
||||
/* OUT Endpoint */
|
||||
if (ep->wMaxPacketSize > dev->epmaxpacketout[b]) {
|
||||
dev->epmaxpacketout[b] = ep->wMaxPacketSize;
|
||||
if (ep_wMaxPacketSize > dev->epmaxpacketout[b]) {
|
||||
dev->epmaxpacketout[b] = ep_wMaxPacketSize;
|
||||
USB_PRINTF("##EP epmaxpacketout[%d] = %d\n",
|
||||
b, dev->epmaxpacketout[b]);
|
||||
}
|
||||
} else {
|
||||
/* IN Endpoint */
|
||||
if (ep->wMaxPacketSize > dev->epmaxpacketin[b]) {
|
||||
dev->epmaxpacketin[b] = ep->wMaxPacketSize;
|
||||
if (ep_wMaxPacketSize > dev->epmaxpacketin[b]) {
|
||||
dev->epmaxpacketin[b] = ep_wMaxPacketSize;
|
||||
USB_PRINTF("##EP epmaxpacketin[%d] = %d\n",
|
||||
b, dev->epmaxpacketin[b]);
|
||||
}
|
||||
@@ -333,6 +336,7 @@ int usb_parse_config(struct usb_device *dev, unsigned char *buffer, int cfgno)
|
||||
struct usb_descriptor_header *head;
|
||||
int index, ifno, epno, curr_if_num;
|
||||
int i;
|
||||
u16 ep_wMaxPacketSize;
|
||||
|
||||
ifno = -1;
|
||||
epno = -1;
|
||||
@@ -378,8 +382,15 @@ int usb_parse_config(struct usb_device *dev, unsigned char *buffer, int cfgno)
|
||||
dev->config.if_desc[ifno].no_of_ep++;
|
||||
memcpy(&dev->config.if_desc[ifno].ep_desc[epno],
|
||||
&buffer[index], buffer[index]);
|
||||
le16_to_cpus(&(dev->config.if_desc[ifno].ep_desc[epno].\
|
||||
wMaxPacketSize));
|
||||
ep_wMaxPacketSize = get_unaligned(&dev->config.\
|
||||
if_desc[ifno].\
|
||||
ep_desc[epno].\
|
||||
wMaxPacketSize);
|
||||
put_unaligned(le16_to_cpu(ep_wMaxPacketSize),
|
||||
&dev->config.\
|
||||
if_desc[ifno].\
|
||||
ep_desc[epno].\
|
||||
wMaxPacketSize);
|
||||
USB_PRINTF("if %d, ep %d\n", ifno, epno);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -97,7 +97,7 @@ char *pick_a_tool(void)
|
||||
printf("failed to add item!");
|
||||
menu_destroy(m);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (menu_get_choice(m, (void **)&tool) != 1)
|
||||
|
||||
@@ -43,7 +43,7 @@ I2C:
|
||||
* I2C1_CH0: EEPROM AT24C64(0x50) RCW, AT24C02(0x51) DDR SPD,
|
||||
AT24C02(0x53) DDR SPD, AT24C02(0x57) SystemID, RTC DS3232(0x68)
|
||||
* I2C1_CH1: 1588 RiserCard(0x55), HSLB Testport, TempMon
|
||||
ADT7461(0x4C), SerDesMux DS64MB201(0x51/59/5C/5D)
|
||||
ADT7461(0x4C), SerDesMux DS64MB201(0x51/59/5C/5D)
|
||||
* I2C1_CH2: VDD/GVDD/GIDD ZL6100 (0x21/0x22/0x23/0x24/0x40)
|
||||
* I2C1_CH3: OCM CFG AT24C02(0x55), OCM IPL AT24C64(0x56)
|
||||
* I2C1_CH4: PCIe SLOT1
|
||||
@@ -108,4 +108,3 @@ Place a linux uImage in the TFTP disk area.
|
||||
tftp 2000000 rootfs.ext2.gz.uboot
|
||||
tftp 3000000 p3060rdb.dtb
|
||||
bootm 1000000 2000000 3000000
|
||||
|
||||
|
||||
@@ -115,50 +115,50 @@ Supported global commands
|
||||
-------------------------
|
||||
Unrecognized commands are ignored.
|
||||
|
||||
default <label> - the label named here is treated as the default and is
|
||||
the first label 'pxe boot' attempts to boot.
|
||||
default <label> - the label named here is treated as the default and is
|
||||
the first label 'pxe boot' attempts to boot.
|
||||
|
||||
menu title <string> - sets a title for the menu of labels being displayed.
|
||||
|
||||
menu include <path> - use tftp to retrieve the pxe file at <path>, which
|
||||
is then immediately parsed as if the start of its
|
||||
contents were the next line in the current file. nesting
|
||||
of include up to 16 files deep is supported.
|
||||
is then immediately parsed as if the start of its
|
||||
contents were the next line in the current file. nesting
|
||||
of include up to 16 files deep is supported.
|
||||
|
||||
prompt <flag> - if 1, always prompt the user to enter a label to boot
|
||||
from. if 0, only prompt the user if timeout expires.
|
||||
prompt <flag> - if 1, always prompt the user to enter a label to boot
|
||||
from. if 0, only prompt the user if timeout expires.
|
||||
|
||||
timeout <num> - wait for user input for <num>/10 seconds before
|
||||
auto-booting a node.
|
||||
auto-booting a node.
|
||||
|
||||
label <name> - begin a label definition. labels continue until
|
||||
a command not recognized as a label command is seen,
|
||||
or EOF is reached.
|
||||
label <name> - begin a label definition. labels continue until
|
||||
a command not recognized as a label command is seen,
|
||||
or EOF is reached.
|
||||
|
||||
Supported label commands
|
||||
------------------------
|
||||
labels end when a command not recognized as a label command is reached, or EOF.
|
||||
|
||||
menu default - set this label as the default label to boot; this is
|
||||
the same behavior as the global default command but
|
||||
specified in a different way
|
||||
menu default - set this label as the default label to boot; this is
|
||||
the same behavior as the global default command but
|
||||
specified in a different way
|
||||
|
||||
kernel <path> - if this label is chosen, use tftp to retrieve the kernel
|
||||
at <path>. it will be stored at the address indicated in
|
||||
the kernel_addr_r environment variable, and that address
|
||||
will be passed to bootm to boot this kernel.
|
||||
kernel <path> - if this label is chosen, use tftp to retrieve the kernel
|
||||
at <path>. it will be stored at the address indicated in
|
||||
the kernel_addr_r environment variable, and that address
|
||||
will be passed to bootm to boot this kernel.
|
||||
|
||||
append <string> - use <string> as the kernel command line when booting this
|
||||
label.
|
||||
append <string> - use <string> as the kernel command line when booting this
|
||||
label.
|
||||
|
||||
initrd <path> - if this label is chosen, use tftp to retrieve the initrd
|
||||
at <path>. it will be stored at the address indicated in
|
||||
the initrd_addr_r environment variable, and that address
|
||||
will be passed to bootm.
|
||||
initrd <path> - if this label is chosen, use tftp to retrieve the initrd
|
||||
at <path>. it will be stored at the address indicated in
|
||||
the initrd_addr_r environment variable, and that address
|
||||
will be passed to bootm.
|
||||
|
||||
localboot <flag> - Run the command defined by "localcmd" in the environment.
|
||||
<flag> is ignored and is only here to match the syntax of
|
||||
PXELINUX config files.
|
||||
<flag> is ignored and is only here to match the syntax of
|
||||
PXELINUX config files.
|
||||
|
||||
Example
|
||||
-------
|
||||
@@ -217,7 +217,7 @@ PXELINUX and U-boot's pxe support.
|
||||
|
||||
- U-boot's pxe doesn't provide the full menu implementation that PXELINUX
|
||||
does, only a simple text based menu using the commands described in
|
||||
this README. With PXELINUX, it's possible to have a graphical boot
|
||||
this README. With PXELINUX, it's possible to have a graphical boot
|
||||
menu, submenus, passwords, etc. U-boot's pxe could be extended to support
|
||||
a more robust menuing system like that of PXELINUX's.
|
||||
|
||||
|
||||
@@ -67,11 +67,10 @@ Update SPI ROM:
|
||||
============================
|
||||
|
||||
1. Copy u-boot image to RAM area.
|
||||
2. Probe SPI device.
|
||||
=> sf probe 0
|
||||
2. Probe SPI device.
|
||||
=> sf probe 0
|
||||
8192 KiB M25P64 at 0:0 is now current device
|
||||
3. Erase SPI ROM.
|
||||
=> sf erase 0 80000
|
||||
=> sf erase 0 80000
|
||||
4. Write u-boot image to SPI ROM.
|
||||
=> sf write 0x89000000 0 80000
|
||||
|
||||
|
||||
@@ -435,4 +435,3 @@ enum RPADIR_BIT {
|
||||
enum FIFO_SIZE_BIT {
|
||||
FIFO_SIZE_T = 0x00000700, FIFO_SIZE_R = 0x00000007,
|
||||
};
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <config.h>
|
||||
#include <circbuf.h>
|
||||
#include <stdio_dev.h>
|
||||
#include <asm/unaligned.h>
|
||||
#include "usbtty.h"
|
||||
#include "usb_cdc_acm.h"
|
||||
#include "usbdescriptors.h"
|
||||
@@ -626,6 +627,9 @@ static void usbtty_init_strings (void)
|
||||
usb_strings = usbtty_string_table;
|
||||
}
|
||||
|
||||
#define init_wMaxPacketSize(x) le16_to_cpu(get_unaligned(\
|
||||
&ep_descriptor_ptrs[(x) - 1]->wMaxPacketSize));
|
||||
|
||||
static void usbtty_init_instances (void)
|
||||
{
|
||||
int i;
|
||||
@@ -688,14 +692,12 @@ static void usbtty_init_instances (void)
|
||||
endpoint_instance[i].rcv_attributes =
|
||||
ep_descriptor_ptrs[i - 1]->bmAttributes;
|
||||
|
||||
endpoint_instance[i].rcv_packetSize =
|
||||
le16_to_cpu(ep_descriptor_ptrs[i - 1]->wMaxPacketSize);
|
||||
endpoint_instance[i].rcv_packetSize = init_wMaxPacketSize(i);
|
||||
|
||||
endpoint_instance[i].tx_attributes =
|
||||
ep_descriptor_ptrs[i - 1]->bmAttributes;
|
||||
|
||||
endpoint_instance[i].tx_packetSize =
|
||||
le16_to_cpu(ep_descriptor_ptrs[i - 1]->wMaxPacketSize);
|
||||
endpoint_instance[i].tx_packetSize = init_wMaxPacketSize(i);
|
||||
|
||||
endpoint_instance[i].tx_attributes =
|
||||
ep_descriptor_ptrs[i - 1]->bmAttributes;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <linux/usb/ch9.h>
|
||||
#include <asm/errno.h>
|
||||
#include <linux/usb/gadget.h>
|
||||
#include <asm/unaligned.h>
|
||||
#include "gadget_chips.h"
|
||||
|
||||
#define isdigit(c) ('0' <= (c) && (c) <= '9')
|
||||
@@ -127,7 +128,7 @@ static int ep_matches(
|
||||
* where it's an output parameter representing the full speed limit.
|
||||
* the usb spec fixes high speed bulk maxpacket at 512 bytes.
|
||||
*/
|
||||
max = 0x7ff & le16_to_cpu(desc->wMaxPacketSize);
|
||||
max = 0x7ff & le16_to_cpu(get_unaligned(&desc->wMaxPacketSize));
|
||||
switch (type) {
|
||||
case USB_ENDPOINT_XFER_INT:
|
||||
/* INT: limit 64 bytes full speed, 1024 high speed */
|
||||
@@ -143,7 +144,8 @@ static int ep_matches(
|
||||
return 0;
|
||||
|
||||
/* BOTH: "high bandwidth" works only at high speed */
|
||||
if ((desc->wMaxPacketSize & __constant_cpu_to_le16(3<<11))) {
|
||||
if ((get_unaligned(&desc->wMaxPacketSize) &
|
||||
__constant_cpu_to_le16(3<<11))) {
|
||||
if (!gadget->is_dualspeed)
|
||||
return 0;
|
||||
/* configure your hardware with enough buffering!! */
|
||||
@@ -176,7 +178,7 @@ static int ep_matches(
|
||||
/* min() doesn't work on bitfields with gcc-3.5 */
|
||||
if (size > 64)
|
||||
size = 64;
|
||||
desc->wMaxPacketSize = cpu_to_le16(size);
|
||||
put_unaligned(cpu_to_le16(size), &desc->wMaxPacketSize);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -195,12 +195,12 @@ static int udc_read_urb_ep0(void)
|
||||
|
||||
for (i = 0; i < w; i++) {
|
||||
data32[ep0_urb->actual_length / 4 + i] = readl(UDCDN(0));
|
||||
// ep0_urb->actual_length += 4;
|
||||
/* ep0_urb->actual_length += 4; */
|
||||
}
|
||||
|
||||
for (i = 0; i < b; i++) {
|
||||
data8[ep0_urb->actual_length + w * 4 + i] = readb(UDCDN(0));
|
||||
// ep0_urb->actual_length++;
|
||||
/* ep0_urb->actual_length++; */
|
||||
}
|
||||
|
||||
ep0_urb->actual_length += n;
|
||||
@@ -599,7 +599,6 @@ void udc_setup_ep(struct usb_device_instance *device, unsigned int id,
|
||||
|
||||
writel(tmp, UDCCN(ep_num));
|
||||
|
||||
//usbdbg
|
||||
usbdbg("UDCCR%c = %x", 'A' + ep_num-1, readl(UDCCN(ep_num)));
|
||||
usbdbg("UDCCSR%c = %x", 'A' + ep_num-1, readl(UDCCSN(ep_num)));
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <linux/usb/gadget.h>
|
||||
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/unaligned.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
@@ -586,7 +587,8 @@ static int s3c_ep_enable(struct usb_ep *_ep,
|
||||
if (!_ep || !desc || ep->desc || _ep->name == ep0name
|
||||
|| desc->bDescriptorType != USB_DT_ENDPOINT
|
||||
|| ep->bEndpointAddress != desc->bEndpointAddress
|
||||
|| ep_maxpacket(ep) < le16_to_cpu(desc->wMaxPacketSize)) {
|
||||
|| ep_maxpacket(ep) <
|
||||
le16_to_cpu(get_unaligned(&desc->wMaxPacketSize))) {
|
||||
|
||||
DEBUG("%s: bad ep or descriptor\n", __func__);
|
||||
return -EINVAL;
|
||||
@@ -603,8 +605,8 @@ static int s3c_ep_enable(struct usb_ep *_ep,
|
||||
|
||||
/* hardware _could_ do smaller, but driver doesn't */
|
||||
if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK
|
||||
&& le16_to_cpu(desc->wMaxPacketSize) != ep_maxpacket(ep))
|
||||
|| !desc->wMaxPacketSize) {
|
||||
&& le16_to_cpu(get_unaligned(&desc->wMaxPacketSize)) !=
|
||||
ep_maxpacket(ep)) || !get_unaligned(&desc->wMaxPacketSize)) {
|
||||
|
||||
DEBUG("%s: bad %s maxpacket\n", __func__, _ep->name);
|
||||
return -ERANGE;
|
||||
@@ -620,7 +622,7 @@ static int s3c_ep_enable(struct usb_ep *_ep,
|
||||
ep->stopped = 0;
|
||||
ep->desc = desc;
|
||||
ep->pio_irqs = 0;
|
||||
ep->ep.maxpacket = le16_to_cpu(desc->wMaxPacketSize);
|
||||
ep->ep.maxpacket = le16_to_cpu(get_unaligned(&desc->wMaxPacketSize));
|
||||
|
||||
/* Reset halt state */
|
||||
s3c_udc_set_nak(ep);
|
||||
|
||||
@@ -251,5 +251,3 @@ int ehci_hcd_stop(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ static int ulpi_request(u32 ulpi_viewport, u32 value)
|
||||
return err;
|
||||
}
|
||||
|
||||
u32 ulpi_write(u32 ulpi_viewport, u8 *reg, u32 value)
|
||||
int ulpi_write(u32 ulpi_viewport, u8 *reg, u32 value)
|
||||
{
|
||||
u32 val = ULPI_RWRUN | ULPI_RWCTRL | ((u32)reg << 16) | (value & 0xff);
|
||||
|
||||
@@ -107,7 +107,7 @@ u32 ulpi_write(u32 ulpi_viewport, u8 *reg, u32 value)
|
||||
|
||||
u32 ulpi_read(u32 ulpi_viewport, u8 *reg)
|
||||
{
|
||||
u32 err;
|
||||
int err;
|
||||
u32 val = ULPI_RWRUN | ((u32)reg << 16);
|
||||
|
||||
err = ulpi_request(ulpi_viewport, val);
|
||||
|
||||
@@ -39,8 +39,8 @@ static struct ulpi_regs *ulpi = (struct ulpi_regs *)0;
|
||||
|
||||
static int ulpi_integrity_check(u32 ulpi_viewport)
|
||||
{
|
||||
u32 err, val, tval = ULPI_TEST_VALUE;
|
||||
int i;
|
||||
u32 val, tval = ULPI_TEST_VALUE;
|
||||
int err, i;
|
||||
|
||||
/* Use the 'special' test value to check all bits */
|
||||
for (i = 0; i < 2; i++, tval <<= 1) {
|
||||
@@ -79,9 +79,9 @@ int ulpi_init(u32 ulpi_viewport)
|
||||
return ulpi_integrity_check(ulpi_viewport);
|
||||
}
|
||||
|
||||
int ulpi_select_transceiver(u32 ulpi_viewport, u8 speed)
|
||||
int ulpi_select_transceiver(u32 ulpi_viewport, unsigned speed)
|
||||
{
|
||||
u8 tspeed = ULPI_FC_FULL_SPEED;
|
||||
u32 tspeed = ULPI_FC_FULL_SPEED;
|
||||
u32 val;
|
||||
|
||||
switch (speed) {
|
||||
@@ -92,8 +92,8 @@ int ulpi_select_transceiver(u32 ulpi_viewport, u8 speed)
|
||||
tspeed = speed;
|
||||
break;
|
||||
default:
|
||||
printf("ULPI: %s: wrong transceiver speed specified, "
|
||||
"falling back to full speed\n", __func__);
|
||||
printf("ULPI: %s: wrong transceiver speed specified: %u, "
|
||||
"falling back to full speed\n", __func__, speed);
|
||||
}
|
||||
|
||||
val = ulpi_read(ulpi_viewport, &ulpi->function_ctrl);
|
||||
@@ -127,9 +127,9 @@ int ulpi_set_pd(u32 ulpi_viewport, int enable)
|
||||
return ulpi_write(ulpi_viewport, reg, val);
|
||||
}
|
||||
|
||||
int ulpi_opmode_sel(u32 ulpi_viewport, u8 opmode)
|
||||
int ulpi_opmode_sel(u32 ulpi_viewport, unsigned opmode)
|
||||
{
|
||||
u8 topmode = ULPI_FC_OPMODE_NORMAL;
|
||||
u32 topmode = ULPI_FC_OPMODE_NORMAL;
|
||||
u32 val;
|
||||
|
||||
switch (opmode) {
|
||||
@@ -140,8 +140,8 @@ int ulpi_opmode_sel(u32 ulpi_viewport, u8 opmode)
|
||||
topmode = opmode;
|
||||
break;
|
||||
default:
|
||||
printf("ULPI: %s: wrong OpMode specified, "
|
||||
"falling back to OpMode Normal\n", __func__);
|
||||
printf("ULPI: %s: wrong OpMode specified: %u, "
|
||||
"falling back to OpMode Normal\n", __func__, opmode);
|
||||
}
|
||||
|
||||
val = ulpi_read(ulpi_viewport, &ulpi->function_ctrl);
|
||||
@@ -154,15 +154,15 @@ int ulpi_opmode_sel(u32 ulpi_viewport, u8 opmode)
|
||||
return ulpi_write(ulpi_viewport, &ulpi->function_ctrl, val);
|
||||
}
|
||||
|
||||
int ulpi_serial_mode_enable(u32 ulpi_viewport, u8 smode)
|
||||
int ulpi_serial_mode_enable(u32 ulpi_viewport, unsigned smode)
|
||||
{
|
||||
switch (smode) {
|
||||
case ULPI_IFACE_6_PIN_SERIAL_MODE:
|
||||
case ULPI_IFACE_3_PIN_SERIAL_MODE:
|
||||
break;
|
||||
default:
|
||||
printf("ULPI: %s: unrecognized Serial Mode specified\n",
|
||||
__func__);
|
||||
printf("ULPI: %s: unrecognized Serial Mode specified: %u\n",
|
||||
__func__, smode);
|
||||
return ULPI_ERROR;
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ int ulpi_serial_mode_enable(u32 ulpi_viewport, u8 smode)
|
||||
|
||||
int ulpi_suspend(u32 ulpi_viewport)
|
||||
{
|
||||
u32 err;
|
||||
int err;
|
||||
|
||||
err = ulpi_write(ulpi_viewport, &ulpi->function_ctrl_clear,
|
||||
ULPI_FC_SUSPENDM);
|
||||
@@ -214,7 +214,7 @@ int ulpi_reset_wait(u32) __attribute__((weak, alias("__ulpi_reset_wait")));
|
||||
|
||||
int ulpi_reset(u32 ulpi_viewport)
|
||||
{
|
||||
u32 err;
|
||||
int err;
|
||||
|
||||
err = ulpi_write(ulpi_viewport,
|
||||
&ulpi->function_ctrl_set, ULPI_FC_RESET);
|
||||
|
||||
@@ -103,12 +103,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
|
||||
#define CONFIG_SYS_MEMTEST_END 0x1fffffff
|
||||
#define CONFIG_PANIC_HANG /* do not reset board on panic */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Config the L2 Cache as L2 SRAM
|
||||
*/
|
||||
@@ -316,7 +310,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
|
||||
#define _IO_BASE 0x00000000
|
||||
#endif
|
||||
|
||||
|
||||
#define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
|
||||
#define CONFIG_DOS_PARTITION
|
||||
|
||||
@@ -563,6 +556,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
|
||||
"tftp $fdtaddr $tftppath/$fdtfile;" \
|
||||
"bootm $loadaddr - $fdtaddr"
|
||||
|
||||
|
||||
#define CONFIG_RAMBOOTCOMMAND \
|
||||
"setenv bootargs root=/dev/ram rw " \
|
||||
"console=$consoledev,$baudrate $othbootargs;" \
|
||||
|
||||
@@ -161,6 +161,7 @@
|
||||
#define CONFIG_INITRD_TAG 1
|
||||
|
||||
#undef CONFIG_SKIP_LOWLEVEL_INIT
|
||||
#define CONFIG_BOARD_EARLY_INIT_F
|
||||
|
||||
/*
|
||||
* Hardware drivers
|
||||
|
||||
@@ -172,6 +172,7 @@
|
||||
|
||||
#undef CONFIG_SKIP_LOWLEVEL_INIT
|
||||
#define CONFIG_USER_LOWLEVEL_INIT 1
|
||||
#define CONFIG_BOARD_EARLY_INIT_F
|
||||
|
||||
/*
|
||||
* Hardware drivers
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
#define CONFIG_INITRD_TAG 1
|
||||
|
||||
#define CONFIG_SKIP_LOWLEVEL_INIT
|
||||
#define CONFIG_BOARD_EARLY_INIT_F
|
||||
|
||||
/*
|
||||
* Hardware drivers
|
||||
|
||||
@@ -262,4 +262,8 @@
|
||||
#define CONFIG_PMIC_I2C
|
||||
#define CONFIG_PMIC_MAX8998
|
||||
|
||||
#define CONFIG_USB_GADGET
|
||||
#define CONFIG_USB_GADGET_S3C_UDC_OTG
|
||||
#define CONFIG_USB_GADGET_DUALSPEED
|
||||
|
||||
#endif /* __CONFIG_H */
|
||||
|
||||
@@ -76,6 +76,7 @@ enum {
|
||||
|
||||
#define MAX8998_LDO3 (1 << 2)
|
||||
#define MAX8998_LDO8 (1 << 5)
|
||||
#define MAX8998_SAFEOUT1 (1 << 4)
|
||||
|
||||
#define MAX8998_I2C_ADDR (0xCC >> 1)
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ int ulpi_init(u32 ulpi_viewport);
|
||||
* ULPI_FC_LOW_SPEED, ULPI_FC_FS4LS
|
||||
* returns 0 on success, ULPI_ERROR on failure.
|
||||
*/
|
||||
int ulpi_select_transceiver(u32 ulpi_viewport, u8 speed);
|
||||
int ulpi_select_transceiver(u32 ulpi_viewport, unsigned speed);
|
||||
|
||||
/*
|
||||
* Enable/disable VBUS.
|
||||
@@ -66,7 +66,7 @@ int ulpi_set_pd(u32 ulpi_viewport, int enable);
|
||||
*
|
||||
* returns 0 on success, ULPI_ERROR on failure.
|
||||
*/
|
||||
int ulpi_opmode_sel(u32 ulpi_viewport, u8 opmode);
|
||||
int ulpi_opmode_sel(u32 ulpi_viewport, unsigned opmode);
|
||||
|
||||
/*
|
||||
* Switch to Serial Mode.
|
||||
@@ -78,7 +78,7 @@ int ulpi_opmode_sel(u32 ulpi_viewport, u8 opmode);
|
||||
* Switches immediately to Serial Mode.
|
||||
* To return from Serial Mode, STP line needs to be asserted.
|
||||
*/
|
||||
int ulpi_serial_mode_enable(u32 ulpi_viewport, u8 smode);
|
||||
int ulpi_serial_mode_enable(u32 ulpi_viewport, unsigned smode);
|
||||
|
||||
/*
|
||||
* Put PHY into low power mode.
|
||||
@@ -108,7 +108,7 @@ int ulpi_reset(u32 ulpi_viewport);
|
||||
*
|
||||
* returns 0 on success, ULPI_ERROR on failure.
|
||||
*/
|
||||
u32 ulpi_write(u32 ulpi_viewport, u8 *reg, u32 value);
|
||||
int ulpi_write(u32 ulpi_viewport, u8 *reg, u32 value);
|
||||
|
||||
/*
|
||||
* Read the ULPI PHY register content via the viewport.
|
||||
|
||||
@@ -199,7 +199,7 @@ struct usb_endpoint_descriptor {
|
||||
u8 bmAttributes;
|
||||
u16 wMaxPacketSize;
|
||||
u8 bInterval;
|
||||
} __attribute__ ((packed)) __attribute__ ((aligned(2)));
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct usb_interface_descriptor {
|
||||
u8 bLength;
|
||||
|
||||
@@ -1,40 +1,177 @@
|
||||
#!/bin/sh
|
||||
# Print additional version information for non-release trees.
|
||||
#
|
||||
# This scripts adds local version information from the version
|
||||
# control systems git, mercurial (hg) and subversion (svn).
|
||||
#
|
||||
# It was originally copied from the Linux kernel v3.2.0-rc4 and modified
|
||||
# to support the U-Boot build-system.
|
||||
#
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [srctree]" >&2
|
||||
echo "Usage: $0 [--save-scmversion] [srctree]" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
cd "${1:-.}" || usage
|
||||
scm_only=false
|
||||
srctree=.
|
||||
if test "$1" = "--save-scmversion"; then
|
||||
scm_only=true
|
||||
shift
|
||||
fi
|
||||
if test $# -gt 0; then
|
||||
srctree=$1
|
||||
shift
|
||||
fi
|
||||
if test $# -gt 0 -o ! -d "$srctree"; then
|
||||
usage
|
||||
fi
|
||||
|
||||
# Check for git and a git repo.
|
||||
if head=`git rev-parse --verify HEAD 2>/dev/null`; then
|
||||
# Do we have an untagged version?
|
||||
if git name-rev --tags HEAD | \
|
||||
grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then
|
||||
(git describe || git describe --tags || git describe --all --long) \
|
||||
2>/dev/null | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
|
||||
scm_version()
|
||||
{
|
||||
local short
|
||||
short=false
|
||||
|
||||
cd "$srctree"
|
||||
if test -e .scmversion; then
|
||||
cat .scmversion
|
||||
return
|
||||
fi
|
||||
if test "$1" = "--short"; then
|
||||
short=true
|
||||
fi
|
||||
|
||||
# Are there uncommitted changes?
|
||||
git update-index --refresh --unmerged > /dev/null
|
||||
if git diff-index --name-only HEAD | grep -v "^scripts/package" \
|
||||
| read dummy; then
|
||||
printf '%s' -dirty
|
||||
# Check for git and a git repo.
|
||||
if test -e .git && head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
|
||||
|
||||
# If we are at a tagged commit (like "v2.6.30-rc6"), we ignore
|
||||
# it, because this version is defined in the top level Makefile.
|
||||
if [ -z "`git describe --exact-match 2>/dev/null`" ]; then
|
||||
|
||||
# If only the short version is requested, don't bother
|
||||
# running further git commands
|
||||
if $short; then
|
||||
echo "+"
|
||||
return
|
||||
fi
|
||||
# If we are past a tagged commit (like
|
||||
# "v2.6.30-rc5-302-g72357d5"), we pretty print it.
|
||||
if atag="`git describe 2>/dev/null`"; then
|
||||
echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
|
||||
|
||||
# If we don't have a tag at all we print -g{commitish}.
|
||||
else
|
||||
printf '%s%s' -g $head
|
||||
fi
|
||||
fi
|
||||
|
||||
# Is this git on svn?
|
||||
if git config --get svn-remote.svn.url >/dev/null; then
|
||||
printf -- '-svn%s' "`git svn find-rev $head`"
|
||||
fi
|
||||
|
||||
# Update index only on r/w media
|
||||
[ -w . ] && git update-index --refresh --unmerged > /dev/null
|
||||
|
||||
# Check for uncommitted changes
|
||||
if git diff-index --name-only HEAD | grep -v "^scripts/package" \
|
||||
| read dummy; then
|
||||
printf '%s' -dirty
|
||||
fi
|
||||
|
||||
# All done with git
|
||||
return
|
||||
fi
|
||||
|
||||
# Is this git on svn?
|
||||
if git config --get svn-remote.svn.url >/dev/null; then
|
||||
printf -- '-svn%s' "`git svn find-rev $head`"
|
||||
# Check for mercurial and a mercurial repo.
|
||||
if test -d .hg && hgid=`hg id 2>/dev/null`; then
|
||||
# Do we have an tagged version? If so, latesttagdistance == 1
|
||||
if [ "`hg log -r . --template '{latesttagdistance}'`" == "1" ]; then
|
||||
id=`hg log -r . --template '{latesttag}'`
|
||||
printf '%s%s' -hg "$id"
|
||||
else
|
||||
tag=`printf '%s' "$hgid" | cut -d' ' -f2`
|
||||
if [ -z "$tag" -o "$tag" = tip ]; then
|
||||
id=`printf '%s' "$hgid" | sed 's/[+ ].*//'`
|
||||
printf '%s%s' -hg "$id"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Are there uncommitted changes?
|
||||
# These are represented by + after the changeset id.
|
||||
case "$hgid" in
|
||||
*+|*+\ *) printf '%s' -dirty ;;
|
||||
esac
|
||||
|
||||
# All done with mercurial
|
||||
return
|
||||
fi
|
||||
|
||||
# Check for svn and a svn repo.
|
||||
if rev=`svn info 2>/dev/null | grep '^Last Changed Rev'`; then
|
||||
rev=`echo $rev | awk '{print $NF}'`
|
||||
printf -- '-svn%s' "$rev"
|
||||
|
||||
# All done with svn
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
collect_files()
|
||||
{
|
||||
local file res
|
||||
|
||||
for file; do
|
||||
case "$file" in
|
||||
*\~*)
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
if test -e "$file"; then
|
||||
res="$res$(cat "$file")"
|
||||
fi
|
||||
done
|
||||
echo "$res"
|
||||
}
|
||||
|
||||
if $scm_only; then
|
||||
if test ! -e .scmversion; then
|
||||
res=$(scm_version)
|
||||
echo "$res" >.scmversion
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
||||
#if test -e include/config/auto.conf; then
|
||||
# . include/config/auto.conf
|
||||
#else
|
||||
# echo "Error: kernelrelease not valid - run 'make prepare' to update it"
|
||||
# exit 1
|
||||
#fi
|
||||
CONFIG_LOCALVERSION=
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
|
||||
# localversion* files in the build and source directory
|
||||
res="$(collect_files localversion*)"
|
||||
if test ! "$srctree" -ef .; then
|
||||
res="$res$(collect_files "$srctree"/localversion*)"
|
||||
fi
|
||||
|
||||
# CONFIG_LOCALVERSION and LOCALVERSION (if set)
|
||||
res="${res}${CONFIG_LOCALVERSION}${LOCALVERSION}"
|
||||
|
||||
# scm version string if not at a tagged commit
|
||||
if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
|
||||
# full scm version string
|
||||
res="$res$(scm_version)"
|
||||
else
|
||||
# append a plus sign if the repository is not in a clean
|
||||
# annotated or signed tagged state (as git describe only
|
||||
# looks at signed or annotated tags - git tag -a/-s) and
|
||||
# LOCALVERSION= is not specified
|
||||
if test "${LOCALVERSION+set}" != "set"; then
|
||||
scm=$(scm_version --short)
|
||||
res="$res${scm:++}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check for svn and a svn repo.
|
||||
if rev=`svn info 2>/dev/null` ; then
|
||||
rev=`echo "${rev}" | grep '^Revision' | awk '{print $NF}'`
|
||||
printf -- '-svn%s' $rev
|
||||
fi
|
||||
|
||||
# Check for any localversion-* files
|
||||
printf '%s' "`cat localversion-* 2>/dev/null`"
|
||||
echo "$res"
|
||||
|
||||
Reference in New Issue
Block a user