2009年3月31日 星期二

090401 午 寶山路 寶二水庫 水仙路 柯湖路

今天要出去時才發現在 前天摔車時把FR的觸控螢幕給摔壞了!! 不知道還有沒有救,這樣連pin碼都不能輸入,所以今天沒有FR導航...

軌跡


Name : WBT201
Numbers of Point : 1083
Distance : 27.603 Km (17.152 Mile)
All Time : 1 Hour 39 Minute 22 Second(2009-04-01T11:38:10 ~ 2009-04-01T13:17:32)
Move Time : 1 Hour 30 Minute 17 Second
Stop Time : 9 Minute 5 Second
Average Speed(All Time) : 16.667 KMH(10.357 MPH)
Average Speed (Move Time) : 18.344 KMH(11.399 MPH)
Max. Speed : 52 KMH(32.311 MPH)
Max. Altitude : 223 Meters(731.627 Feets)
Min. Altitude : 26 Meters(85.302 Feets)
Zone : +08:00


PCIe Messages sent by Root Complex

PCIe Messages sent by Root Complex is by RC itself or by software?

per PCIe base spec rev2.0
RC would send those messages

  • PM_Active_State_Nak
    used by upstream port to reject to enter L1 state, should be sent by RC automatically.
    p322
    Rules in case of rejection:
    • In the case of a rejection, the Upstream component must schedule, as soon as possible, a rejection by sending the PM_Active_State_Nak Message to the Downstream component. Once the PM_Active_State_Nak Message is sent, the Upstream component is permitted to initiate any TLP or DLLP transfers.

  • PME_Turn_Off
    seems could be sent (cause?) by software
    p297
    The following example sequence illustrates the multi-step Link state transition process leading up to entering a system sleep state:
    1. System software directs all Functions of a Downstream component to D3hot.
    2. The Downstream component then initiates the transition of the Link to L1 as required.
    3. System software then causes the Root Complex to broadcast the PME_Turn_Off Message in preparation for removing the main power source.
    4. This Message causes the subject Link to transition back to L0 in order to send it and to enable the Downstream component to respond with PME_TO_Ack.
    5. After sending the PME_TO_Ack, the Downstream component initiates the L2/L3 Ready transition protocol.
    L0 → L1 → L0 → L2/L3 Ready

  • Unlock
    seems RC should send it automatically
    p376
    6.5. Locked Transactions

    6.5.1. Introduction

    Locked Transaction support is required to prevent deadlock in systems that use legacy software which causes the accesses to I/O devices. Note that some CPUs may generate locked accesses as a result of executing instructions that implicitly trigger lock. Some legacy software misuses these transactions and generates locked sequences even when exclusive access is not required.

    (........................)

    6.5.2. Initiation and Propagation of Locked Transactions - Rules

    Locked transaction sequences are generated by the Host CPU(s) as one or more reads followed by a number of writes to the same location(s). When a lock is established, all other traffic is blocked from using the path between the Root Complex and the locked Legacy Endpoint or Bridge.
    • A locked transaction sequence or attempted locked transaction sequence is initiated on PCI Express using the “lock”–type Read Request/Completion (MRdLk/CplDLk) and terminated with the Unlock Message

  • Set_Slot_Power_Limit
    seems RC should send it automatically
    p77
    2.2.8.5. Slot Power Limit Support

    (........................)

    The Set_Slot_Power_Limit Message includes a one DW data payload. The data payload is copied from the Slot Capabilities register of the Downstream Port and is written into the Device Capabilities register of the Upstream Port on the other side of the Link. Bits 1:0 of Byte 1 of the data payload map to the Slot Power Limit Scale field and bits 7:0 of Byte 0 map to the Slot Power Limit Value field. Bits 7:0 of Byte 3, 7:0 of Byte 2, and 7:2 of Byte 1 of the data payload must be set to all 0’s by the Transmitter and ignored by the Receiver. This Message must be sent automatically by the Downstream Port (of a Root Complex or a Switch) when one of the following events occurs:
    • On a Configuration Write to the Slot Capabilities register (see Section 7.8.9) when the Data Link Layer reports DL_Up status.
    • Any time when a Link transitions from a non-DL_Up status to a DL_Up status(see Section 2.9.2). This Transmission is optional if the Slot Capabilities register has not yet been initialized.
    The component on the other side of the Link (with Endpoint, Switch, or Bridge Functions) that receives Set_Slot_Power_Limit Message must copy the values in the data payload into the Device Capabilities register associated with the component’s Upstream Port. PCI Express components that are targeted exclusively for integration on the system planar (e.g., system board) as well as components that are targeted for integration on a card/module where power consumption of the entire card/module is below the lowest power limit specified for the card/module form factor (as defined in the corresponding form factor specification) are permitted to hardwire the value 0b in the Slot Power Limit Scale and Slot Power Limit Value fields of the Device Capabilities register, and are not required to copy the Set_Slot_Power limit payload into that register.
  • Vendor-defined messages
    "Not defined" means RC could never send it automatically!!!
    p77
    2.2.8.6. Vendor_Defined Messages

    The Vendor_Defined Messages allow expansion of PCI Express messaging capabilities, either as a general extension to the PCI Express Specification or a vendor-specific extension. Such extensions are not covered specifically in this document, although future revisions of this specification may use this mechanism to define new Messages (see below). This section defines the rules associated with these Messages generically.

    (...........................)

    • A data payload may be included with either type of Vendor_Defined Message (TLP type is Msg if no data payload is included and MsgD if a data payload is included)


2009年3月30日 星期一

摔車 換後輪框 原來FR傷最大...

昨天(090330)在公司下停車場時摔車
應該不是煞車打滑,因為根本還沒打滑我就被甩出去了
可能是 停車架 沒有踢上來,轉彎時卡到水溝蓋
人沒事,手腳小擦傷
車子後輪整個偏掉,只好把後煞放掉,才能騎回來

090401 ps: 今天才發現,原來傷最大的的是我的 freerunner....面板左下角整個碎掉,雖然顯示沒問題,但是左下大約四分之ㄧ部份無法觸控,這樣連pin碼都key不進去..... T_T



今天(090331)去換了個框
鋁合金,$650

卸鎖牙式飛輪需要用 鎖牙飛輪拆卸套筒 把飛輪卸下來
(原來棘輪是在飛輪上的ㄚ,我一直以為後輪花鼓就是棘輪ㄌㄟ...)
http://goods.ruten.com.tw/item/show?11081211927419#pic

USB Device speed identification


Full-speed device cable and resistor


Low-speed device cable and resistor

  • By position of the pull-up resister on device, if on D-, => use low-speed mode
  • if on D+, then the device is full-speed or high-speed
    • hub drive SE0
    • device detects assertion of SE0
      • if nothing happened, then it is a full-speed device
      • if device send ChirpK, then hub send K-J Chirp pairs, and device detects it successfully, => use high-speed mode
        • any fails => use full-speed mode



Chirp J/K

低速下空闲状态为“K”状态;
全速下空闲状态为“J”状态;
高速下空闲状态为“SE0”状态;
DP
DM
HS-J
1
0
HS-K
0
1
FS-J
1
0
FS-K
0
1
LS-J
0
1
LS-K
1
0

USB specification revision 2.0, 7.1.5 device speed identification

USB2.0速度识别
http://hi.baidu.com/doyanger/blog/item/af45d995dd64f419d31b704d.html

[硬件和PCB]usb高速握手过程
http://www.52rd.com/Blog/Detail_RD.Blog_swordlife_17644.html


HS SOF

2009年3月27日 星期五

Linux PCI Error Recovery

Documentation/PCI/pci-error-recovery.txt

link_rest沒人用,倒是系統有提供一個reset_link

include/linux/pci.h

/* PCI bus error event callbacks */
struct pci_error_handlers {
/* PCI bus error detected on this device */
pci_ers_result_t (*error_detected)(struct pci_dev *dev,
enum pci_channel_state error);

/* MMIO has been re-enabled, but not DMA */
pci_ers_result_t (*mmio_enabled)(struct pci_dev *dev);

/* PCI Express link has been reset */
pci_ers_result_t (* link_reset)(struct pci_dev *dev);

/* PCI slot has been reset */
pci_ers_result_t (*slot_reset)(struct pci_dev *dev);

/* Device driver may resume normal operations */
void (*resume)(struct pci_dev *dev);
};


drivers/pci/pcie/aer/aerdrv_core.c
/**
* do_recovery - handle nonfatal/fatal error recovery process
* @aerdev: pointer to a pcie_device data structure of root port
* @dev: pointer to a pci_dev data structure of agent detecting an error
* @severity: error severity type
*
* Invoked when an error is nonfatal/fatal. Once being invoked, broadcast
* error detected message to all downstream drivers within a hierarchy in
* question and return the returned code.
*/
static pci_ers_result_t do_recovery(struct pcie_device *aerdev,
struct pci_dev *dev,
int severity)
{
pci_ers_result_t status, result = PCI_ERS_RESULT_RECOVERED;
enum pci_channel_state state;

if (severity == AER_FATAL)
state = pci_channel_io_frozen;
else
state = pci_channel_io_normal;

status = broadcast_error_message(dev,
state,
"error_detected",
report_error_detected);

if (severity == AER_FATAL) {
result = reset_link(aerdev, dev);
if (result != PCI_ERS_RESULT_RECOVERED) {
/* TODO: Should panic here? */
return result;
}
}

if (status == PCI_ERS_RESULT_CAN_RECOVER)
status = broadcast_error_message(dev,
state,
"mmio_enabled",
report_mmio_enabled);

if (status == PCI_ERS_RESULT_NEED_RESET) {
/*
* TODO: Should call platform-specific
* functions to reset slot before calling
* drivers' slot_reset callbacks?
*/
status = broadcast_error_message(dev,
state,
"slot_reset",
report_slot_reset);
}

if (status == PCI_ERS_RESULT_RECOVERED)
broadcast_error_message(dev,
state,
"resume",
report_resume);

return status;
}

090327 午 經國大橋 高鐵新竹站 竹中大橋

其實是陪descent去買高鐵票,還吃了不怎樣又很貴的摩斯漢堡 雙人套餐...

軌跡


Name : WBT201
Numbers of Point : 642
Distance : 16.670 Km (10.358 Mile)
All Time : 1 Hour 34 Minute 59 Second(2009-03-27T12:02:08 ~ 2009-03-27T13:37:07)
Move Time : 53 Minute 0 Second
Stop Time : 41 Minute 59 Second
Average Speed(All Time) : 10.530 KMH(6.543 MPH)
Average Speed (Move Time) : 18.872 KMH(11.726 MPH)
Max. Speed : 57 KMH(35.418 MPH)
Max. Altitude : 118 Meters(387.139 Feets)
Min. Altitude : 45 Meters(147.638 Feets)
Zone : +08:00


2009年3月26日 星期四

2009年3月24日 星期二

090325 午 寶山路 寶二水庫 公園路

寶二爛斃了的自行車道,跟馬路根本就一起走,也沒什麼景點可看,而且石磚路面騎起來比較費力,還不如走馬路,感覺上只是為了設自行車道而設的,一點都沒規劃...

可是寶二的風景真是好ㄚ~~一路上的湖景山景讓人心情就是一整個愉快!! 只是沒辦法環湖,因為google map沒有寶二這附近的地圖,又忘了帶descent的track,結果到實地為了搞清楚到底該怎麼走花太多時間....

在快到公園路時就看到遠遠的左邊山地有一大片不知道什麼的白色東西,還以為是石粒ㄌㄟ,結果是 竹東鎮垃圾掩埋場,才轉進公園路不久就聞到垃圾臭味,馬的一整的不酥湖...以後不走這裡了......

軌跡+照片


軌跡


Name : WBT201
Numbers of Point : 1256
Distance : 32.586 Km (20.248 Mile)
All Time : 2 Hour 8 Minute 30 Second(2009-03-25T11:31:01 ~ 2009-03-25T13:39:31)
Move Time : 1 Hour 42 Minute 34 Second
Stop Time : 25 Minute 56 Second
Average Speed(All Time) : 15.215 KMH(9.454 MPH)
Average Speed (Move Time) : 19.062 KMH(11.845 MPH)
Max. Speed : 52 KMH(32.311 MPH)
Max. Altitude : 250 Meters(820.210 Feets)
Min. Altitude : 86 Meters(282.152 Feets)
Zone : +08:00


ARM PCI initialization

arch/arm/mach-kirkwood/pcie.c

static struct pci_ops pcie_ops = {
.read = pcie_rd_conf,
.write = pcie_wr_conf,
};

(...............)

static struct pci_bus __init *
kirkwood_pcie_scan_bus(int nr, struct pci_sys_data *sys)
{
struct pci_bus *bus;

if (nr == 0) {
bus = pci_scan_bus(sys->busnr, &pcie_ops, sys);
} else {
bus = NULL;
BUG();
}

return bus;
}

static int __init kirkwood_pcie_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
return IRQ_KIRKWOOD_PCIE;
}

static struct hw_pci kirkwood_pci __initdata = {
.nr_controllers = 1,
.swizzle = pci_std_swizzle,
.setup = kirkwood_pcie_setup,
.scan = kirkwood_pcie_scan_bus,
.map_irq = kirkwood_pcie_map_irq,
};

void __init kirkwood_pcie_init(void)
{
pci_common_init(&kirkwood_pci);
}


platform_device & platform_driver

porting PCI driver to platform driver

Function
PCI device & driver
platform device & driver
device structure struct pci_devstruct platform_device
device registration & enumerationN/A
(already defined by physical device, and enumerated by XXXX)
platform_device_register
platform_add_devices
driver structure struct pci_driverstruct platform_driver
driver registration pci_register_driverplatform_driver_registe
platform_driver_probe
device class specific data in single driverpci_driver -> (struct pci_device_id) pci_ids -> (kernel_ulong_t) driver_data N/A
(so there is no place in platform device to hold currently the driver_data carried by pci_device_id)
driver unregistration pci_unregister_driverplatform_driver_unregister
get driver private datapci_get_drvdataplatform_get_drvdata
set driver private datapci_set_drvdataplatform_set_drvdata
driver probeinclude/linux/pci.h: int (*probe) (struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */
Device ID specific data could be carried by id->device_data within the same pci driver.
include/linux/platform_device.h: int (*probe)(struct platform_device *);
get device resourceBAR0~5
pci_resource_flags
pci_resource_len
platform_get_resource
get device irqpdev -> irqplatform_get_irq

* one thing I think platform_device is not convenient is that, it has no way to take a device specific data, so I can't just write a generic platform_driver and uses different platform_device with only a small change. for example, sdhci_pci_fixes role in provided in pci_device_id -> driver_data of SDHCI PCI driver (sdhci-pci.c).


static struct resource xxxxx_resource[] = {
[0] = {
.start = 0x80000000,
.end = 0x80000000+0x100,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 41,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device xxxxx_device = {
.name = "xxxxx-i2c",
.num_resources = 2,
.resource = xxxxx_i2c_resource,
};


static struct platform_driver xxxxx_platform_driver = {
.remove = __exit_p(xxxxx_platform_remove),
.suspend = xxxxx_platform_suspend,
.resume = xxxxx_platform_resume,
.driver = {
.name = "xxxxx-platform",
.owner = THIS_MODULE,
},
};


platform_driver_probe(&xxxxx_platform_driver, xxxxx_platform_probe);
platform_driver_unregister(&xxxxx_platform_driver);

regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
host->regs = ioremap(regs->start, regs->end - regs->start + 1);
irq = platform_get_irq(pdev, 0);


Documentation/driver-model/platform.txt

platform_device和platform_driver(一)
http://blog.chinaunix.net/u1/57747/showart_1073860.html

platform_device和platform_driver(二)
http://blog.chinaunix.net/u1/57747/showart.php?id=1074059

linux resouce,platform_device和platform_driver驱动的关系
http://blog.chinaunix.net/u1/49507/showart_494193.html

linux kernel 2.6.24.3 platform device driver
http://top12345tw.blogspot.com/2008/03/linux-kernel-26243-platform-device.html

platform _device和platform_driver注册过程
http://blog.chinaunix.net/u2/60011/showart.php?id=1018999

PCI bus number assignment & Linux

So, bus number is assigned by software.


PCI-to-PCI Bridge Architecture Specification, Revision 1.1, December 18, 1998

3.1.2. Type 1 Configuration Transaction Support

During a Type 1 configuration transaction, address bits AD[23::16] specify a unique PCI bus in the PCI hierarchy on which the target of the transaction resides. The bridge compares the specified bus number with three configuration registers that are programmed by initialization code to determine whether to claim and forward a Type 1 configuration transaction across the bridge.

(...................)

3.1.2.1. Primary Interface

(...................)

The bridge ignores a Type 1 configuration transaction on its primary interface, if the bus number specified by address bits AD[23::16] does not fall within the range of bus numbers specified by the Secondary Bus Number (inclusive) and Subordinate Bus Number (inclusive) registers. In this case, the Type 1 configuration transaction is specifying a bus number that is not located behind the bridge.

The bridge claims a Type 1 configuration transaction on its primary interface, if the bus number specified by address bits AD[23::16] falls within the range of bus numbers specified by the Secondary Bus Number (inclusive) and Subordinate Bus Number (inclusive) registers. In this case, the Type 1 configuration transaction is specifying a bus number that is located behind the bridge.
ie, if "Secondary Bus Number" >="bus number specified" >= "Subordinate Bus Number", the bus is located behind the bridge

3.2.5.2. Primary Bus Number Register

The Primary Bus Number register is used to record the bus number of the PCI bus segment to which the primary interface of the bridge is connected. Configuration software programs the value in this register. The bridge uses this register to decode Type 1 configuration transactions on the secondary interface that must be converted to Special Cycle transactions on the primary interface. A bridge must2 implement this register as a read/write register and the default state after reset must be zero.

3.2.5.3. Secondary Bus Number Register

The Secondary Bus Number register is used to record the bus number of the PCI bus segment to which the secondary interface of the bridge is connected. Configuration software programs the value in this register. The bridge uses this register to determine when to respond to a Type 1 configuration transaction on the primary interface and convert it to a Type 0 transaction on the secondary interface. The bridge also uses the Secondary Bus Number register and the Subordinate Bus Number register to determine when to forward Type 1 configuration transactions upstream. A bridge must implement this register as a read/write register and the default state after reset must be zero.

3.2.5.4. Subordinate Bus Number Register

The Subordinate Bus Number register is used to record the bus number of the highest numbered PCI bus segment which is behind (or subordinate to) the bridge. Configuration software programs the value in this register. The bridge uses this register in conjunction with the Secondary Bus Number register to determine when to respond to a Type 1 configuration transaction on the primary interface and to pass it to the secondary interface. The bridge also uses the Secondary Bus Number register and the Subordinate Bus Number register to determine when to forward Type 1 configuration transactions upstream. A bridge must implement this register as a read/write register and the default state after reset must be zero.

(...................)

11.2. System Initialization

When bridges are present in a system, the BIOS is required to provide the following functions during the initialization process (each will be discussed in the following sections):
· Assignment of PCI bus numbers
· Allocation of address spaces (Prefetchable Memory, Memory Mapped I/O, I/O)
· Writing the IRQ number into each device
· Initializing the PCI display subsystem

11.2.1. Assigning Bus Numbers

The BIOS must assign PCI bus numbers to each bridge in the system. In what order they are assigned and when the assignments are made is not specified. All buses located behind a bridge must reside between the Secondary Bus Number and the Subordinate Bus Number (inclusive).

Linux设备驱动之pci设备的枚举
http://www.diybl.com/course/6_system/linux/Linuxjs/2008827/137983_6.html

2009年3月23日 星期一

Linux MMC (SD)

linux-2.6.27

drivers/mmc/core/Makefile

obj-$(CONFIG_MMC)  += mmc_core.o
mmc_core-y := core.o bus.o host.o \
mmc.o mmc_ops.o sd.o sd_ops.o \
sdio.o sdio_ops.o sdio_bus.o \
sdio_cis.o sdio_io.o sdio_irq.o


drivers/mmc/core/core.c
static int __init mmc_init(void)
{
int ret;

workqueue = create_singlethread_workqueue("kmmcd");
if (!workqueue)
return -ENOMEM;

ret = mmc_register_bus();
if (ret)
goto destroy_workqueue;

ret = mmc_register_host_class();
if (ret)
goto unregister_bus;

ret = sdio_register_bus();
if (ret)
goto unregister_host_class;

return 0;

unregister_host_class:
mmc_unregister_host_class();
unregister_bus:
mmc_unregister_bus();
destroy_workqueue:
destroy_workqueue(workqueue);

return ret;
}

subsys_initcall(mmc_init);


drivers/mmc/core/bus.c
static struct bus_type mmc_bus_type = {
.name = "mmc",
.dev_attrs = mmc_dev_attrs,
.match = mmc_bus_match,
.uevent = mmc_bus_uevent,
.probe = mmc_bus_probe,
.remove = mmc_bus_remove,
.suspend = mmc_bus_suspend,
.resume = mmc_bus_resume,
};

int mmc_register_bus(void)
{
return bus_register(&mmc_bus_type);
}


drivers/mmc/core/host.c

static struct class mmc_host_class = {
.name = "mmc_host",
.dev_release = mmc_host_classdev_release,
};

int mmc_register_host_class(void)
{
return class_register(&mmc_host_class);
}


drivers/mmc/core/sdio_bus.c
static struct bus_type sdio_bus_type = {
.name = "sdio",
.dev_attrs = sdio_dev_attrs,
.match = sdio_bus_match,
.uevent = sdio_bus_uevent,
.probe = sdio_bus_probe,
.remove = sdio_bus_remove,
};

int sdio_register_bus(void)
{
return bus_register(&sdio_bus_type);
}




















drivers/mmc/card/Kconfig
config MMC_TEST
tristate "MMC host test driver"
default n
help
Development driver that performs a series of reads and writes
to a memory card in order to expose certain well known bugs
in host controllers. The tests are executed by writing to the
"test" file in sysfs under each card. Note that whatever is
on your card will be overwritten by these tests.

This driver is only of interest to those developing or
testing a host driver. Most people should say N here.

to run all test:
echo "" > /sys/class/mmc_host/mmc0/mmc0\:e624/test

to run test case 1 only:
echo 1 > /sys/class/mmc_host/mmc0/mmc0\:e624/test

http://fixunix.com/kernel/489349-mmc_test-some-results.html
http://lkml.org/lkml/2008/5/17/45

Writing Modern Linux SDIO Drivers
http://www.varsanofiev.com/inside/WritingLinuxSDIODrivers.htm

2009年3月22日 星期日

090323 午 峰城路 下大壢農路 寶山路

今天一開始就有點賽: 先是忘了帶相機,又忘記帶門禁卡,所以沒照片;然後剛開始不久就在雙園路附近的大下坡摔了水壺,整個破掉,沒水了。


軌跡


Name : WBT201
Numbers of Point : 989
Distance : 25.272 Km (15.703 Mile)
All Time : 1 Hour 29 Minute 35 Second(2009-03-23T11:50:06 ~ 2009-03-23T13:19:41)
Move Time : 1 Hour 24 Minute 4 Second
Stop Time : 5 Minute 31 Second
Average Speed(All Time) : 16.926 KMH(10.518 MPH)
Average Speed (Move Time) : 18.037 KMH(11.208 MPH)
Max. Speed : 54 KMH(33.554 MPH)
Max. Altitude : 204 Meters(669.291 Feets)
Min. Altitude : 70 Meters(229.659 Feets)
Zone : +08:00


090320 午 柯湖路 水仙路 小探

想探探那條在google map上通向高速公路的小路;說實話這裡應該是人家的果園,我最後甚至得全身壓低才能騎過樹下。其實可能是有路,隱隱約約看的到有人走過的痕跡,還有界樁,只是要走下去需要的不是腳踏車,是開山刀...

在高速公路邊看到條小路,下去可以通到 寶山休息站,可是寶山休息站什麼都沒有,就只有廁所和販賣機....

最後,通向 五步哭山 的那條小路被鐵門擋住了,也上不去...

軌跡


Name : WBT201
Numbers of Point : 924
Distance : 14.126 Km (8.777 Mile)
All Time : 1 Hour 27 Minute 58 Second(2009-03-20T12:18:26 ~ 2009-03-20T13:46:24)
Move Time : 1 Hour 17 Minute 58 Second
Stop Time : 10 Minute 0 Second
Average Speed(All Time) : 9.635 KMH(5.987 MPH)
Average Speed (Move Time) : 10.871 KMH(6.755 MPH)
Max. Speed : 46 KMH(28.583 MPH)
Max. Altitude : 171 Meters(561.024 Feets)
Min. Altitude : 66 Meters(216.535 Feets)
Zone : +08:00


Testing USB host/device

USB Testing on Linux(last modified: 17 March 2007)
http://www.linux-usb.org/usbtest/

DUT USB host [run testusb or test.sh] <--------> USB/OTG device [run Gadget Zero (or some other driver)]

USB host [run testusb or test.sh] <--------> DUT USB/OTG device [run Gadget Zero (or some other driver)]

  • Control Transfer : Any gadget driver
  • Bulk Transfer : Gadget Zero, Gadgetfs
  • Isochronous Traffic : Gadgetfs
  • Network test: Gadget ether
  • OTG protocol test

usb.org/Developers/Tools
http://www.usb.org/developers/tools/
USB20CV R1.3.5 - Windows XP SP2 ( English Version Only)
http://www.usb.org/developers/tools/InstallUSB20CV135.msi

USBCV Chapter 9 Tests

WinXP or Vista USB host [run usbcv] <--------> DUT (usb/otg device) [Run Gadget Zero (or some other driver)]

2009年3月19日 星期四

American primal cuts 牛肉部位




Beef
http://en.wikipedia.org/wiki/Beef

關於牛排 (1)
http://evilcapitalismheroes.blogspot.com/2009/02/1.html

關於牛排 (2)
http://evilcapitalismheroes.blogspot.com/2009/02/2.html

辣死人不償命嗎.....

想試試看ㄟ.....

[wiki] Scoville scale
http://en.wikipedia.org/wiki/Scoville_scale
[wiki] 史高維爾指標 (史柯維爾、史克維爾)
http://zh.wikipedia.org/wiki/%E5%8F%B2%E9%AB%98%E7%B6%AD%E7%88%BE%E6%8C%87%E6%A8%99

挑戰最辣牛肉麵 吃到送醫急救 拚一萬元 參賽者飆淚發抖硬撐
http://www.ttv.com.tw/098/03/0980315/09803154919303L.htm

以國際用的辣度量表史柯維爾指標來看,防狼噴霧的辣度是20到30萬SHU,催淚瓦斯是200萬.而這碗以印度鬼椒製成的辣醬,也有104萬SHU.簡直快要逼近生化武器.


57萬辣度的殺手辣醬,叔叔有練過,小朋友千萬不要吃…
http://www.wahahaha.idv.tw/wahahaha/img/diarynum.asp?cat_num=2695

[蘭欣山莊] 墨西哥殺手辣醬(蒜味)140g (57萬度)
http://www.lansin-villa.com.tw/T5004ShowCmdyData?y_KindId=903939&y_SketchName=Sketch1-2_Hi178

[蘭欣山莊] 印度鬼椒辣醬(蒜味) (100萬度)
http://www.lansin-villa.com.tw/T5004ShowCmdyData?&y_SketchName=Sketch1-2_Hi178&y_KindId=929258&y_HrefId=136092&y_CompId=215&&y_MuId=

蘭欣山莊農場●●●世界第二辣●●●墨西哥 殺手●辣椒醬●[蒜味] (140g)
http://goods.ruten.com.tw/item/qa?11080624579576

dai420206的賣場
http://class.ruten.com.tw/user/index00.php?c=&m=&o=&p=&s=dai420206

[wiki] 布莱的一千六百万储备(Blair's 16 Million Reserve)
http://zh.wikipedia.org/wiki/%E4%B8%80%E5%8D%83%E5%85%AD%E7%99%BE%E8%90%AC%E5%84%B2%E5%82%99

Gardner Resources, Inc.
Blair's 16 Million Reserve
http://www.chilliworld.com/SP6.asp?p_id=63
The Ultimate Limited Edition, only 999 - It cannot get hotter than this...


The Scoville Heat Scale.
http://www.chilliworld.com/FactFile/Scoville_Scale.asp

2009年3月17日 星期二

090318 午 三峰路 二重埔新城路 小路再遊 之 一直走錯路...

同場加映 20090318 探索新竹之美 - 系列二 - 新竹寶山附近亂騎[午騎]
http://descent-incoming.blogspot.com/2009/03/20090318.html

ref
090317 午 柯湖路 寶山水庫 之 鬼地方真的有路
090303 中午 公司 "順便" 繞很遠

昨天找到的那條路,descent似乎很愛,今天無論如何都想再去一次,而且帶上兩台相機(DV+手機相機....),要給他好好記錄一下。不過今天不想再從柯湖路上,就改從另一邊 三峰路 上去。

走錯三次路,後面兩次真是ooxx......,一走錯就得爬大上坡上來,而且都走了三次的路,還可以走錯..... -_-||||
(啊就都走過,所以都有印象ㄇㄟ....)

(照片和track的時間差還沒解決,晚點在更新地圖與照片)
已解決,現在位置都是對的囉,如何解決記錄在:
http://mkl-note.blogspot.com/2008/02/geotag-photo.html

軌跡


Name : WBT201
Numbers of Point : 1388
Distance : 26.808 Km (16.658 Mile)
All Time : 2 Hour 39 Minute 48 Second(2009-03-18T11:48:08 ~ 2009-03-18T14:27:56)
Move Time : 1 Hour 57 Minute 7 Second
Stop Time : 42 Minute 41 Second
Average Speed(All Time) : 10.066 KMH(6.254 MPH)
Average Speed (Move Time) : 13.734 KMH(8.534 MPH)
Max. Speed : 54 KMH(33.554 MPH)
Max. Altitude : 205 Meters(672.572 Feets)
Min. Altitude : 58 Meters(190.289 Feets)
Zone : +08:00


Differential Signaling

Differential Signalinghttp://download.intel.com/education/highered/signal/ELCT865/Class2_10_11_12_Differential_Signaling.ppt

Current Mode Logic
(...............)
  • No real spec yet but can infer operation from spec’s like PCI Express™ , Infiniband™, USB, SATA, etc.

(...............)

8b/10b: Overview
  • The 10 bits are referred to as a “symbol” or a “code-group:”
  • The original 8 bits are broken into a 3 bit block and a 5 bit block (each of these are called sub-blocks)
    • F1 -> 111 10001
  • The 3 bit sub-block (labeled HGF) is encoded into 4 new bits (labeled fghj) & the 5 bit sub-block (EDCBA) is encoded into 6 new bits (abcdei)
    • HGFEDCBA notation commonly represents the un-encoded bits, and abcdeifghj represents the encoded bits; note that the relative order and position of the sub-blocks is switched upon encoding
      • HGF EDCBA -> abcdei fghj
    • Hence, an extra bit, j , is added to the newly encoded 3 bit block and an extra bit, i , to the encoded 45 bit block creating a 4 and 56 bit sub-blocks

2009年3月16日 星期一

090317 午 柯湖路 寶山水庫 之 鬼地方真的有路

本來預期是很多山路的(其實也不少...),所以有刻意保留些體力,不過因為臨時拉回來,所以似乎沒什麼累的感覺。上次在這條路上吃鱉,回來後在google空照圖上發現一條小路,一直想騎騎看,剛好這次descent覺得繼續走太遠了,就決定回頭繞回去,卻沒注意到,其實那條路我們上次有騎過,只是上次累到靠杯,這次是爽爽溜~~

另外在 油田路 上 雞油凸 附近的風景真是一整個好ㄚ

軌跡


Name : WBT201
Numbers of Point : 932
Distance : 20.532 Km (12.758 Mile)
All Time : 1 Hour 43 Minute 28 Second(2009-03-17T11:57:25 ~ 2009-03-17T13:40:53)
Move Time : 1 Hour 16 Minute 33 Second
Stop Time : 26 Minute 55 Second
Average Speed(All Time) : 11.906 KMH(7.398 MPH)
Average Speed (Move Time) : 16.093 KMH(10.000 MPH)
Max. Speed : 56 KMH(34.797 MPH)
Max. Altitude : 191 Meters(626.640 Feets)
Min. Altitude : 70 Meters(229.659 Feets)
Zone : +08:00


2009年3月15日 星期日

090316 午 柯湖路 寶山水庫

軌跡


Name : WBT201
Numbers of Point : 734
Distance : 15.759 Km (9.792 Mile)
All Time : 1 Hour 11 Minute 57 Second(2009-03-16T12:25:30 ~ 2009-03-16T13:37:27)
Move Time : 1 Hour 3 Minute 6 Second
Stop Time : 8 Minute 51 Second
Average Speed(All Time) : 13.142 KMH(8.166 MPH)
Average Speed (Move Time) : 14.985 KMH(9.311 MPH)
Max. Speed : 43 KMH(26.719 MPH)
Max. Altitude : 202 Meters(662.730 Feets)
Min. Altitude : 49 Meters(160.761 Feets)
Zone : +08:00


090313 搭高鐵回嘉義

新竹市區->高鐵新竹站 $0, >49'58" (因為是上車後才開logger的)
高鐵自由座 $730, 51'46"
高鐵嘉義站->嘉義中山公園 $51, 48'12"
總計$781, 149'56"
爽度*****

回程搭台鐵
台鐵嘉義站->台鐵新竹站, $423, 136' (可是大約delay了10-15min)
爽度*

搭高鐵就是一整個爽ㄚ,即使是沒位置,站也不用站多久;三段車程都不會覺得太長,等接駁車的時間也不長;可是呢,加上接駁車的時間,卻比搭台鐵慢了,雖然這樣比並不客觀,可是我想兩者時間差也差不到20分,而價格卻是要上快兩倍ㄚ!!! 台鐵雖然有買到位置,可是車廂就是一整個擠呀,而且最後還誤點了十幾分鐘(周日的關係)

其實多花358買那個爽度我是覺得還蠻有價值的,只是要我每次都搭的話,荷包怕會受不了吧 :p

http://mkl0301.googlepages.com/090313.html

(以下只有高鐵上的那段...)
Name : WBT201
Numbers of Point : 185
Distance : 180.465 Km (112.136 Mile)
All Time : 51 Minute 46 Second(2009-03-13T21:38:09 ~ 2009-03-13T22:29:55)
Move Time : 48 Minute 13 Second
Stop Time : 3 Minute 33 Second
Average Speed(All Time) : 209.167 KMH(129.971 MPH)
Average Speed (Move Time) : 224.568 KMH(139.540 MPH)
Max. Speed : 300 KMH(186.411 MPH) (傳說中的300kmh呀!!呀!!呀!!呀!!呀!!呀!!呀!!呀!!呀!!)
Max. Altitude : 246 Meters(807.087 Feets)
Min. Altitude : 3 Meters(9.843 Feets)
Zone : +08:00


2009年3月13日 星期五

PCIe

Power Management
D0
D1
D2
D3

  • D3_hot: with Vcc, can access configuration space
  • D3_cold: without Vcc, cannot access configuration space

LogiCORE PCI Express - What is the Maximum Payload Size (MPS) value of the PCI Express core? What does the MPS do?
http://www.xilinx.com/support/answers/22880.htm

確保資料傳送完整性 揭開PCIe介面重送緩衝器的奧秘
http://www.2cm.com.tw/markettrend_content.asp?sn=0701010788

Integrating PCI Express IP in a SoC
http://www.design-reuse.com/articles/15545/integrating-pci-express-ip-in-a-soc.html

Realizing the Performance Potential of a PCI-Express IP
http://www.design-reuse.com/articles/15900/realizing-the-performance-potential-of-a-pci-express-ip.html

2009年3月11日 星期三

人本教育

財團法人人本教育文教基金會
http://hef.yam.org.tw/index01.htm

人本出版品
http://hef.yam.org.tw/publish/01/index01.htm

索取資料
http://hef.yam.org.tw/math/order/order.htm

每張試聽片需負擔成本及郵資費共$100 (10元郵票10張)
「愛的手冊」工本費及郵資共$80 (10元郵票8張)
(02)2367-0151分機234

打電話去問是說如果要訂購就不必付,不要的話才需要再寄 成本郵資...

090311 下午 力行路後山 之 真的沒路走...

一整天都在下小小的霧雨,但是不出去騎腳會癢....。至此,寶山路到柯湖路間的這塊區域大概所有路都走遍了

這次找的路雖然在地圖上都很可行,甚至看來就是翻個小山頭就到了,可偏偏就沒路了,要不就是狗擋路,有沒有路也不得而知。這樣的話那個平台的offroad點就沒辦法常來了,因為不是走柯湖路就是走水仙路.....

雖然旺園弄得還蠻漂亮,但是登高一看,卻只見到園區工廠的風景,這下什麼興致也沒了

原來 旺園 其實是 "汪"園 啊
剛從 旺園 下來到力行路,迎面就有個警衛走過來盤問為什麼從那裡下來? 我說從 旺園 下來的,他還不死心,還要問,口氣又不是很好,就很懶的理它,走了幾步路,突然想到,這麼機車的警衛,當然要給它拍張照,就在我東照兩張西照兩張時,那警衛又來了。

他一面走過來一面說著: ㄟˋ!!這個人很可疑喔~
我: 不然你要不要把我逮捕嗎?
警: 我回去調錄影帶~

(無言: 阿不然你會看到什麼...阿飄 嗎...就說我從旺園下來..旺園下來..旺園下來..老師在說你有沒有聽?? 沒有嘛~~,啊沒有旺園是不允許外人進入喔,至少我也是看到有個告示牌,也沒說禁止騎腳踏車才進來的,就算不是你咬我ㄚ....)

後記: 平心而論,其實它只有口氣不太好,而且很煩人而已,阿我前面已經很多次被狗搞的很煩了,連人都要來"汪"我,就一整個不爽。就另一方面來說,人家也算是認真負責(?)啦。只是這麼認真負責,就是要來一張啦....


光圓科技(股)公司
最後還是有個大收穫,那就是發現了個專做LED燈的公司,老闆(員工?) 非常客氣,公司主要是設計製造,工廠在高雄,這裡只是展示店面,並不做零售,也沒有大招牌。如果量大(>1k)還可以客製(魚眼聚光的角度等等)。雖然沒有零售,但是仍然願意提供販售店內現有的東西。店內看來從零件、基板,到散熱片、各種座的燈、軟燈....都有,而MR16 5W他們除了有我現有的三LED的,還有一種 1LED配魚眼鏡,聚焦更好,看起來也更亮,只是也較貴: $960。他們還有一顆20W的,不過要吃約1.1A,不是常常夜騎,應該不需要....


不好意思再要求拍照,就在外面拍拍就好,有點模糊


金山十三街騎過去就很舒服,一邊是古色古香的建築,另一邊是花崗岩(?)獨棟透天,一整個高級的感覺,不過似乎入住率很低,幾乎都在賣;其中一棟打了過去問: $2350萬....;不過如同descent說的,住在這裡只有三個出口:金山街介壽路、金山南接力行路 或 光復路189巷光復路一段,路都不大,還要跟附近園區上下班的塞.........

軌跡+照片


仍然無法校正track與照片的時間差,因此還是有位移的問題已解決,現在位置都是對的囉,如何解決記錄在:
http://mkl-note.blogspot.com/2008/02/geotag-photo.html

地圖檢視http://picasaweb.google.com.tw/lh/albumMap?uname=mkl0301&aid=5311866969606815649#map
相片檢視http://picasaweb.google.com.tw/mkl0301/090311#

軌跡


Name : WBT201
Numbers of Point : 839
Distance : 13.436 Km (8.349 Mile)
All Time : 1 Hour 47 Minute 14 Second(2009-03-11T15:05:26 ~ 2009-03-11T16:52:40)
Move Time : 1 Hour 10 Minute 33 Second
Stop Time : 36 Minute 41 Second
Average Speed(All Time) : 7.518 KMH(4.671 MPH)
Average Speed (Move Time) : 11.427 KMH(7.100 MPH)
Max. Speed : 53 KMH(32.933 MPH)
Max. Altitude : 147 Meters(482.283 Feets)
Min. Altitude : 82 Meters(269.029 Feets)
Zone : +08:00



2009年3月10日 星期二

小陽光之家 華德福教育

用錢買不到的教育-側寫華德福的一個家庭
http://www.breastfeeding.org.tw/forum/discuz/viewthread.php?tid=20262&fpage=0&highlight=&page=16
http://www.breastfeeding.org.tw/forum/discuz/viewthread.php?tid=20262&extra=&highlight=&page=1

七歲以前都在「玩」-- 上
http://www.lapislazuli.org/TradCh/magazine/200605/20060502.html
七歲以前都在玩 (下)
http://www.lapislazuli.org/TradCh/magazine/200608/20060804.html

猶豫於華德福和蒙特梭利教育法之間 而得到的省思
http://www.babyhome.com.tw/mboard.php?op=d&bid=11&sID=996607&r=80&page=3

---------以下是我接觸過兩種教育之後的心得-----
*0-7幼兒教育大目標很大的不同
華:保護幼兒使在夢幻狀態
蒙:使幼兒覺醒、覺知自己的定位

*就技術面來說
華:除不讀寫算外,藝術活動、唱歌指謠簡單有規律的律動、說故事、自由遊戲、親近自然、希望由四肢的活動強健基礎的身體並將意志力貫穿全身及腦,提供環境等待孩子的內外成熟,大人所做就是提供穩定的身教示範模仿

蒙:提供多樣的教具、藉由教具自由意志操作(但須遵守教師的規則)以讓孩子建立自學自信,大人公平尊重的對待也讓孩子自重,生活上多樣為孩子著想的硬體設計,讓孩子能成為自己的主人


*相同處
都強調規律有秩序作息對幼兒的好處,呼吸節奏安排有異曲同工之妙
----------------

哪一個較好?以較重理念的父母來說
看父母基於對人的全面了解,心中認定幼兒教育的重點目標,所做出來的選擇,個人覺得較有意義,也才不易隨波逐流
--------------
至於我個人呢

我在上過一年蒙氏居家教育及半年華德福讀書會後
因為基於對人的本質深入研究與理解
並回顧自己驗證自己的生命歷程
我做了後者的選擇


SunnyGarden小陽光華德福親子部落
http://sunnygarden2006.pixnet.net/blog

2008小陽光之家家長手冊 @ SunnyGarden小陽光華德福親子部落
http://sunnygarden2006.pixnet.net/blog/post/19981642#comment-25085653

新竹市立茄苳華德福幼兒園
http://hcjd-waldorf.blogspot.com/
(這裡說搬到下面這個網址了,或到 新竹市立茄苳國小全球資訊網http://w3.cdps.hc.edu.tw/school/web/index.php 點 幼稚園
)
鄭惠卿的首頁
http://w3.cdps.hc.edu.tw/dyna/menu/index.php?account=liki

Hsinchu Waldorf School 新竹華德福小學自主學園
http://waldorfschool.pixnet.net/blog
http://waldorfschool.pixnet.net/blog/post/23394579
有一群孩子,他們的名字叫做小陽光……

2006年春天,拜無遠弗屆的網路之賜,新竹一群熱愛華德福教育的媽媽,與正在日本華德福幼兒園實習,畢業於英國愛默森華德福教育學院的薏琦老師連絡上。

只因為一句「孩子的成長是不能等待的」,短短幾個月時間內,在園長及老師們的努力下,一所位於群樹環繞半山腰間的三合院家庭式幼兒園──小陽光之家誕生了。從此華德福幼兒教育得以在新竹地區落實,也造福了眾多的孩子。

如今這些孩子長大了,即將要有第一屆畢業生進入小學階段。為了讓他們能繼續接受理想的教育,家長們決定動員起來,集結社群的力量,創立新竹華德福小學自主學園,以在家自學方案申請,小私塾型態運作。


RAES's Waldorf Family
http://raes-waldorf.blogspot.com/

2009年3月9日 星期一

090310 午 柯湖路 小路 寶山水庫 再遊 小陽光之家

同場加映 20090310 探索新竹之美 - 系列一 - 科湖路一探 [午騎]
http://descent-incoming.blogspot.com/2009/03/20090310.html

應descent要求,我們又走了一次柯湖路。因為路大都熟了,所以也不怎麼看地圖了。柯湖路 旁邊有許多小路,不知道會通到哪邊,於是我們就邊騎邊晃,一條一條逛。

小陽光之家
http://mkl-note.blogspot.com/2009/03/blog-post_10.html
看到前面那個大上坡,我還真沒興趣上去,而且看起來就是通到人家家裡(事後證明 我錯了,要是不上去會後悔;也沒錯啦,真的是人家家...),一上去就看到三四個小朋友(約3-4+歲)在田邊玩(看吧看吧...跑到人家家裡了啦...還不走),再進去點,又有更多小朋友(這家人會不會太增產報國啦??大概有個10隻以上)(謎之聲: 10隻小王...),後來有個 美女老師 走了出來,才知道這是個 幼稚園 ㄟ~~~

descent靠著他的厚臉皮(經常還蠻有用的...),跟老師攀談起來,還跟人家要合照ㄌㄟ。小朋友大多不怕生,童言童語的問我們來這裡幹麻;直覺小朋友就該是這樣的玩,跟人家去學什麼英語、上什麼數學,小學的課業已經太重,至少幼稚園就該有幼稚園的樣子!! 最後我們要走的時候,小朋友們還追著我們下坡送我們走!! (體力真好,那坡很陡ㄋㄟ......)

軌跡+照片


照片還無法與map結合,所以先link....
遊記照片http://picasaweb.google.com.tw/mkl0301/090310#
遊記地圖http://picasaweb.google.com.tw/lh/albumMap?uname=mkl0301&aid=5311445305704890225#map

(用time machine做geotag,軟體無法校正誤差,因此track跟照片有時間差的位移問題,所以照片的位置幾乎都會跟真實位置差一段距離....)
已解決,現在位置都是對的囉,如何解決記錄在:
http://mkl-note.blogspot.com/2008/02/geotag-photo.html


(在 Picasa 中點 在Google 地球中檢視,會另存成kml檔,然後用gps babel轉成gpx,再跟track gpx一起用GPS Visualizer輸出,再苦命的一個一個移除亂碼(GPSVisualizer不支援中文)、加中文註解,可是無法解決太多圖在同一點的問題)

軌跡


Name : WBT201
Numbers of Point : 1144
Distance : 21.808 Km (13.551 Mile)
All Time : 2 Hour 12 Minute 27 Second(2009-03-10T11:33:24 ~ 2009-03-10T13:45:51)
Move Time : 1 Hour 38 Minute 25 Second
Stop Time : 34 Minute 2 Second
Average Speed(All Time) : 9.879 KMH(6.139 MPH)
Average Speed (Move Time) : 13.295 KMH(8.261 MPH)
Max. Speed : 47 KMH(29.204 MPH)
Max. Altitude : 204 Meters(669.291 Feets)
Min. Altitude : -29 Meters(-95.144 Feets)
Zone : +08:00



2009年3月4日 星期三

090304 柯湖路 寶山水庫 補完計畫

有鑑於昨天騎到快死掉,今天大盤直接從第二盤開始!!

軌跡


Name : WBT201
Numbers of Point : 1041
Distance : 20.070 Km (12.471 Mile)
All Time : 1 Hour 41 Minute 2 Second(2009-03-04T16:02:12 ~ 2009-03-04T17:43:14)
Move Time : 1 Hour 27 Minute 48 Second
Stop Time : 13 Minute 14 Second
Average Speed(All Time) : 11.919 KMH(7.406 MPH)
Average Speed (Move Time) : 13.715 KMH(8.522 MPH)
Max. Speed : 57 KMH(35.418 MPH)
Max. Altitude : 286 Meters(938.320 Feets)
Min. Altitude : 82 Meters(269.029 Feets)
Zone : +08:00