rtos/tinyara.git
7 years agoapps/examples: add a new example for MQTT client
Wonsang Ryou [Mon, 20 Mar 2017 05:56:11 +0000 (14:56 +0900)]
apps/examples: add a new example for MQTT client

This commit adds an example application for MQTT subscriber and
publisher.

Change-Id: I981f8745d5271a68e206d1465a0c5b0069c036cb
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agonetutils/websocket: improve stability websocket library
Junyeon Lee [Mon, 20 Mar 2017 15:37:23 +0000 (00:37 +0900)]
netutils/websocket: improve stability websocket library

This commit is to improve stability of websocket library.
Such as state management, socket operation and etc.

Change-Id: I29c0743358973b169d09e64d5666da059e12d40e
Signed-off-by: Junyeon Lee <junyeon2.lee@samsung.com>
7 years agonetutils/websocket: support hostname resolution
Junyeon Lee [Mon, 20 Mar 2017 15:09:32 +0000 (00:09 +0900)]
netutils/websocket: support hostname resolution

 - Do hostname resolution inside the library instead of expecting
   addresses form the caller application.

 - Allow passing the TLS "auth_mode" parameter from the application.
 - Fix hard-coded server name and used hostname from parameters instead.
 - Add status code 1000 when sending a Close control frame to
   the server. Before no status code was sent (empty payload) which
   caused some websocket servers to return error -1, leading to
   wrong interpretation by the wslay layer and incomplete termination
   of the websocket connection.
 - Add "user_data" field in websocket_t structure to allow upper
   layers to store session specific data.

Change-Id: Ie853c57b8061320cb82fdd3d624da7a629720110
Signed-off-by: Gregory Lemercier <g.lemercier@samsung.com>
7 years agonetutils/websocket: add handshake retry routine
Junyeon Lee [Mon, 20 Mar 2017 14:44:05 +0000 (23:44 +0900)]
netutils/websocket: add handshake retry routine

This commit adds client handshake retry routine for connection stability.
And retry number set by definition of WEBSOCKET_MAX_TLS_HANDSHAKE.

Change-Id: I6191605272d8b436227ae9c12a67cb5fb79804c9
Signed-off-by: Junyeon Lee <junyeon2.lee@samsung.com>
7 years agoexamples/tls_server: make retry count configurable
Junyeon Lee [Fri, 17 Mar 2017 08:35:18 +0000 (17:35 +0900)]
examples/tls_server: make retry count configurable

The number of retry counts was constant and hardcoded, not allowing to
change at runtime. Let the TLS server use the value passed through the
command line argument when it does handshake. For example:

    $ tls_server retry=100

Change-Id: I972c012777d66163902c736ef182820cc36783c2
Signed-off-by: Junyeon Lee <junyeon2.lee@samsung.com>
7 years agosidk_s5jt200: enable artikwifi application
Ivan [Sun, 26 Mar 2017 09:16:25 +0000 (18:16 +0900)]
sidk_s5jt200: enable artikwifi application

Now that the artikwifi application is added, enable it by default in
the 'sidk_tash_wlan' configuration.

Change-Id: Ie51377c127f37ccbd89e5f3a6fa0544d102e069f
Signed-off-by: Ivan <ivan.galkin@samsung.com>
Signed-off-by: Siwon Kang <sw0809.kang@samsung.com>
[Shin: split the original commit into two separated commits]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoapps: add artikwifi application
Ivan [Sun, 26 Mar 2017 09:13:34 +0000 (18:13 +0900)]
apps: add artikwifi application

Application 'artikwifi' is added.

Change-Id: I6c82a39065ccae37ac6ef7dd1591fae5b7b0a8cd
Signed-off-by: Ivan <ivan.galkin@samsung.com>
Signed-off-by: Siwon Kang <sw0809.kang@samsung.com>
[Shin: split the original commit into two separated commits]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
[Kim: fix coding style]
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonetutils: fix several known bugs in http server and client
Junyeon Lee [Fri, 17 Mar 2017 06:22:01 +0000 (15:22 +0900)]
netutils: fix several known bugs in http server and client

Fixes bugs in webserver, client library and example applications based
on it, including:

  . Supports tls handshake retry routine
  . Shrink thread's stack memory usages
  . Fixes compilation errors about NETDB, TLS
  . Maximum request length changed (2048 -> 4096)
  . Changed HW key and certificate configurations
  . Improve stability of webserver, webclient applications

Change-Id: Iac0c2d0ba0ef9e1e9d069b9dd0c7a59d170c5090
Signed-off-by: Junyeon Lee <junyeon2.lee@samsung.com>
7 years agonetutils: introduce MQTT library and APIs
Wonsang Ryou [Fri, 17 Mar 2017 08:02:51 +0000 (17:02 +0900)]
netutils: introduce MQTT library and APIs

This commit adds MQTT library and APIs.
 - MQTT library : mosquitto-1.4.10
 - MQTT APIs : for MQTT client (subscriber/publisher) function

Change-Id: I8c13d808fe05206f0bc6b2c0716b23d2c1bc1f52
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agonet: remove NET_LWIP_DHCPC and NET_LWIP_DHCPS
EunBong Song [Fri, 17 Mar 2017 07:41:03 +0000 (16:41 +0900)]
net: remove NET_LWIP_DHCPC and NET_LWIP_DHCPS

NET_LWIP_DHCPC and NET_LWIP_DHCPS should not be used because this can
break protection build. Instead of these, use NETUTILS_DHCPC and
NETUTILS_DHCPD. This patch removes NET_LWIP_DHCPC and NET_LWIP_DHCPS.

Change-Id: Iba3cbb95e90ae1a91c0d607bbf093dad2ecc4479
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agonetutils/dhcpd: introduce dhcpd application and netutil library
Jin-Seong Kim [Thu, 16 Mar 2017 08:28:22 +0000 (17:28 +0900)]
netutils/dhcpd: introduce dhcpd application and netutil library

Initial commit for dhcpd netutil library and application including:
  - add dhcpd command to create dhcp server pthread as daemon
    (included in net command)
  - add select function instead of repeating recv function in an
    infinite loop
  - fix build-error regarding arp.h

Change-Id: I5286d9136b1fdd7a1c45f44732a104edf49c0dcb
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agosidk_s5jt200: expose GPIO at boot
Ivan [Mon, 20 Mar 2017 11:11:48 +0000 (20:11 +0900)]
sidk_s5jt200: expose GPIO at boot

Code for GPIO expose is called from board init level.
Function s5j_gpioinitialize is used to expose GPIO.

Change-Id: Ic556750d9f7ad5547a93d04c5411aba642cb9141
Signed-off-by: Ivan <ivan.galkin@samsung.com>
7 years agosidk_s5jt200: enable automount
Heesub Shin [Mon, 20 Mar 2017 08:07:38 +0000 (17:07 +0900)]
sidk_s5jt200: enable automount

This commit enalbes the automount feature at SIDK_S5JT200 evaluation
board, so that user and sss r/w partition will be mounted at /mnt and
/sss respectively.

Change-Id: I7918793a9523a71f444dd2fb70dc5782b14e3a1f
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: add to support automount partitions
Heesub Shin [Mon, 20 Mar 2017 07:55:39 +0000 (16:55 +0900)]
sidk_s5jt200: add to support automount partitions

This commit adds new Kconfig entries for configuring automount feature.
If it is enabled, board_app_initialize() will try to mount user r/w file
system and sss r/w file system.

Change-Id: I5f85524e6515e32c52b99678214fc73d69d264ec
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: repartition flash layout
Heesub Shin [Mon, 20 Mar 2017 02:06:51 +0000 (11:06 +0900)]
sidk_s5jt200: repartition flash layout

Partition layout currently configured is not for SIDK_S5JT200. This is
the right configuration.

Change-Id: Ib1c76b0ee6373d3d3ee4446946af0fc77314ded7
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/watchdog: added low level code for WD maintenance
Ivan [Wed, 22 Mar 2017 15:53:21 +0000 (00:53 +0900)]
s5j/watchdog: added low level code for WD maintenance

This is low level chip dependent code to set configure basics features.

More complex code, based on this code, should be located in board
related directory.

Change-Id: I441c156bbad625e9ffe532b666c09edf710efd7b
Signed-off-by: Ivan <ivan.galkin@samsung.com>
7 years agos5j/spi: tidy up a bit
Heesub Shin [Wed, 22 Mar 2017 07:28:36 +0000 (16:28 +0900)]
s5j/spi: tidy up a bit

Change-Id: I78b3b226b66cc6ed6855d4b390aee23e3205c5a4
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: rename SPI driver files
Heesub Shin [Wed, 22 Mar 2017 06:49:08 +0000 (15:49 +0900)]
s5j: rename SPI driver files

For consistency,
    s/s5j_iot_spidrv.c/s5j_spi.c/
    s/s5j_spidrv.h/s5j_spi.h/

Change-Id: Ibb2cecc922e3b51d9d2048ee72d5d2975b0e2ae8
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/irq: removing IDs for non-exist IRQs
Heesub Shin [Tue, 21 Mar 2017 11:55:39 +0000 (20:55 +0900)]
s5j/irq: removing IDs for non-exist IRQs

EINT[3..31] is not available in S5J. So, we do not need to have
definitions for them.

Change-Id: I5f6fdf95b5e0adb7fd8a951550443098f6a5ccfc
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/irq: fix incorrect NR_IRQS definition
Heesub Shin [Tue, 21 Mar 2017 11:19:43 +0000 (20:19 +0900)]
s5j/irq: fix incorrect NR_IRQS definition

NR_IRQS is currently defined as 512. This is unnecessarily huge given
that we have 16 SGIs, 16 PPIs, and only 96 SPIs for external interrupt
sources. As a result, the IRQ vector table in kernel, g_irqvector[],
becomes unnecessarily huge, consuming memory spaces.

Here is a comparison table of libkernel.a for each configuration:

    NR_IRQS    .data    .bss     .text     Total
    512        0       3912      25664    29576
    128        0       2376      25664    28040

As you can see, nearly one and half kilobytes of .bss reduces when
NR_IRQS=128.

Change-Id: Ib90aa90677261ad6b2a680a28a8929085905209b
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/irq: remove macro definitions not in use
Heesub Shin [Tue, 21 Mar 2017 11:00:54 +0000 (20:00 +0900)]
s5j/irq: remove macro definitions not in use

Remove macro definitions that are not in use for better readability.

Change-Id: Ic18733ed3e22abd12e3549976e63aa1d434114c1
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/irq: tidy up a bit
Heesub Shin [Tue, 21 Mar 2017 10:51:10 +0000 (19:51 +0900)]
s5j/irq: tidy up a bit

Fixes trivial coding style issues, replacing spaces with tabs.

Change-Id: I4a40359da7a13002a873590596ee65b025569a3b
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/mct: tidy up a bit
Heesub Shin [Tue, 21 Mar 2017 08:33:18 +0000 (17:33 +0900)]
s5j/mct: tidy up a bit

Fixes trivial coding style issues.

Change-Id: I6893a785335d7f4350647a9abcd2a163246140ec
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/timerisr: remove invalid sanity check
Heesub Shin [Tue, 21 Mar 2017 04:31:44 +0000 (13:31 +0900)]
s5j/timerisr: remove invalid sanity check

S5J has a tick count buffer of 32bits for every local tick counters. So,
there is no point in checking if it is greater than 24bits. I think it
came from some other code the original author refered to.

Change-Id: Ie681e0d76f0a8f57a282736eb7ce19b6a2bce054
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/mct: remove s5j_mct_local_start_timer0
Heesub Shin [Tue, 21 Mar 2017 04:21:59 +0000 (13:21 +0900)]
s5j/mct: remove s5j_mct_local_start_timer0

This commit removes s5j_mct_local_start_timer0() and moves all its code
lines to up_timer_initialize(). There is no point in defining a single
function for such operation contaminating the namespace, as it is not
likely to be reused or called from other than up_timer_initialize().

In addition, it also changes the calculation of tick tick counter, from
(26 * * USEC_PER_TICK) to SYSTICK_RELOAD. This commit does not make any
functional differences.

Change-Id: I4ed8eb53a19fe79c08d4e2177efa5921e2115c96
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/timerisr: rework up_timerisr()
Heesub Shin [Tue, 21 Mar 2017 03:28:21 +0000 (12:28 +0900)]
s5j/timerisr: rework up_timerisr()

Resetting the timer before calling sched_process_timer() seems more
logical.

Change-Id: I3ea0e3475855d58147ed061a8d8693413ec7a86a
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/timerisr: do not check watchdog at up_timerisr()
Heesub Shin [Tue, 21 Mar 2017 02:35:46 +0000 (11:35 +0900)]
s5j/timerisr: do not check watchdog at up_timerisr()

up_timerisr() is not the place for checking the watchdog or kicking it.
So, doing such jobs in up_timerisr() looks very weird and wrong.

Not only that, CONFIG_S5J_WATCHDOG_RESET is not defined. Thus, removing
watchdog things from up_timerisr() does not make any functional
differences.

Change-Id: I3df540ad41f364c37ae07bc24f056f743ab56855
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/timerisr: tidy up a bit
Heesub Shin [Tue, 21 Mar 2017 02:33:55 +0000 (11:33 +0900)]
s5j/timerisr: tidy up a bit

Fixes trivial violations to the coding style and removes unnecessary
code lines that are not in use.

Change-Id: Ibb8d603997557a97abf027ec2a16404aeedd0e4d
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/gpio: clean up code
Ivan [Mon, 20 Mar 2017 11:07:07 +0000 (20:07 +0900)]
s5j/gpio: clean up code

Function open should not expose any GPIOs, so it is remained empty.

Function up_gpioinitialize should not expose any GPIO, remained empty.
This job will be done on board dependednt level by s5j_gpioinitialize()

Change-Id: I83649092e725b0750bea05dd285d52a938a58db2
Signed-off-by: Ivan <ivan.galkin@samsung.com>
7 years agos5j/sflash: do not clear already cleared
Heesub Shin [Sun, 19 Mar 2017 12:02:09 +0000 (21:02 +0900)]
s5j/sflash: do not clear already cleared

s5j_sflash_disable_wp() is trying to clear a bit that is already
cleared.

Change-Id: I6b6d7abcf15f12f619440b65f0eea522662db73d
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/sflash: do not use SFR address
Heesub Shin [Sun, 19 Mar 2017 11:41:38 +0000 (20:41 +0900)]
s5j/sflash: do not use SFR address

To be future-proof and for better readability, all the accesses to SFR
should use macro definitions rather than specifying addresses directly.
This commit fixes it without introducing any functional differences.

Change-Id: I204dacc07621494befce4530970c97286487221b
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/sflash: clean up unnecessary macro definition
Heesub Shin [Sun, 19 Mar 2017 11:25:00 +0000 (20:25 +0900)]
s5j/sflash: clean up unnecessary macro definition

There is no benefit in defineing a new macro for flash base address,
S5J_SFLASH_MAPPED_ADDRESS. Remove it for better readability.

Change-Id: Ieb243e1818e59d29a2bb985491b123f8d441bb6d
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: rename s5j_qspi_init() to s5j_sflash_init()
Heesub Shin [Sun, 19 Mar 2017 11:12:45 +0000 (20:12 +0900)]
s5j: rename s5j_qspi_init() to s5j_sflash_init()

Now that s5j_qspi.c has been merged to s5j_sflash.c, rename
s5j_qspi_init() to s5j_sflash_init() for better consistency.

Change-Id: Ic6c3952225e53ca71f423607782688d68e8b1be9
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: merge qspi and sflash
Heesub Shin [Sun, 19 Mar 2017 11:08:37 +0000 (20:08 +0900)]
s5j: merge qspi and sflash

This commit merges s5j_qspi.c and s5j_sflash.c together. It seems to
alter quite a lot, but it does not introduce any functional differences
at all.

Change-Id: I988b8bb8254206acc4cde05bbdfd24a28bb01cb5
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/qspi: remove mutex
Heesub Shin [Sun, 19 Mar 2017 10:46:59 +0000 (19:46 +0900)]
s5j/qspi: remove mutex

We do not need to have a mutex for protecting QSPI resource, as it is
accessed only when IRQ is disabled. See s5j_sflash.c.

Change-Id: I0e9c8db65e904b27ef5180a681dca355efd80b1b
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/qspi: tidy up a bit
Heesub Shin [Sun, 19 Mar 2017 10:44:12 +0000 (19:44 +0900)]
s5j/qspi: tidy up a bit

Remove unnecessary code lines that are not in use.

Change-Id: I9db6913c8e3d818b4141207ed8f1f8cf4589f4c2
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: remove s5jt200_watchdog.c
Heesub Shin [Sun, 19 Mar 2017 10:29:11 +0000 (19:29 +0900)]
sidk_s5jt200: remove s5jt200_watchdog.c

Remove s5jt200_watchdog.c that is not in use.

Change-Id: I95e693ddd290c3985f12c24fc21b8c2e36766eaf
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: clean up unnecesary lines
Heesub Shin [Sun, 19 Mar 2017 10:25:50 +0000 (19:25 +0900)]
sidk_s5jt200: clean up unnecesary lines

Removes code lines that are not in use. This commit does not make any
functional differences at all.

Change-Id: I064eeaa2413874bf904eef1285428d6be27de065
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: sidk_s5jt200: rework nvram support
Heesub Shin [Sun, 19 Mar 2017 05:41:43 +0000 (14:41 +0900)]
s5j: sidk_s5jt200: rework nvram support

Current design associated with NVRAM support is a mess, accessing to the
flash memory directly in Nv_Read/Write/Erase(). All flash accesses to
flash memory should be done through MTD interface. Any direct access
is invalid and breaks the design.

This commit fixes it by inroducing a new implementation of Nv_xxx()
which is based on MTD config device. It manages NVRAM data from WiFi
application stack.

Change-Id: I6674a982895d13884b7f10db3b417e37acb9ca27
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: set nvram partition type to config
Heesub Shin [Sun, 19 Mar 2017 09:55:19 +0000 (18:55 +0900)]
sidk_s5jt200: set nvram partition type to config

We will use the NVRAM partition as a backing device for storing MTD
configs.

Change-Id: If68e48ace86c1a08d47f5b01501cc71667fad0eb
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: support a new partition type, config
Heesub Shin [Sun, 19 Mar 2017 08:57:15 +0000 (17:57 +0900)]
sidk_s5jt200: support a new partition type, config

This commit introduces a new partition type, 'config'. When it is
specified to an mtd partition, the partiton is initialized by mtdconfig
device at boot.

Change-Id: I6e6ad27f1bf10292607fab520ea86365be091990
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/sflash: remove all unnecessary code lines
Heesub Shin [Sun, 19 Mar 2017 05:37:14 +0000 (14:37 +0900)]
s5j/sflash: remove all unnecessary code lines

This commit cleans up unnecessary code lines that are not in use. It
seems to change extensively, but does not make any functional
difference.

Change-Id: I37e2c742591b089735c88ebcc4e7bd9522b9ddec
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: drop to support fota and crashdump
Heesub Shin [Sun, 19 Mar 2017 05:00:14 +0000 (14:00 +0900)]
sidk_s5jt200: drop to support fota and crashdump

FOTA and crashdump is directly accessing to the S5J flash driver. This
is breaking the whole design and needs to be improved but, there is no
better way than to drop them all completely and redesign them from
scratch.

Change-Id: I228a22044a9be3ebf4911e06ebebd5ef9bde4a72
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: mount procfs at boot
Heesub Shin [Sun, 19 Mar 2017 04:45:51 +0000 (13:45 +0900)]
sidk_s5jt200: mount procfs at boot

procfs is very convenient for examining the current status of OS. Mount
it at boot by default when CONFIG_FS_PROCFS=y.

Change-Id: I6d26ae978123799e737b489debb13ee11bdb7176
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: disable M25 flash driver
Heesub Shin [Sun, 19 Mar 2017 04:15:09 +0000 (13:15 +0900)]
sidk_s5jt200: disable M25 flash driver

We do not use M25P flash driver. Let's disable it.

Change-Id: I6db3a80b7843df54aeef8b61e44fdadde8491d6f
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: enable flash partitions
Heesub Shin [Sat, 18 Mar 2017 10:58:12 +0000 (19:58 +0900)]
sidk_s5jt200: enable flash partitions

Configure flash partitions at boot time.

Change-Id: I92c69894dc583418367481dc4c66f4607ae32f86
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: configure partitions at boot
Heesub Shin [Sat, 18 Mar 2017 10:35:19 +0000 (19:35 +0900)]
sidk_s5jt200: configure partitions at boot

This commit introduces several Kconfig entries for configurting
partitions and adds a function that configures flash partitions
dynamically at boot time. However, there will be no functional
differences yet unless we turn it on. So, don't worry.

Change-Id: I3f10491c6f0c753b2c874310ebfe70596ce0e3c6
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: add to support progmem
Heesub Shin [Sat, 18 Mar 2017 10:28:52 +0000 (19:28 +0900)]
sidk_s5jt200: add to support progmem

This commit adds s5jt200_progmem.c that contains an implementation of
progmem interfaces. As it is linked with the final binary only when
CONFIG_MTD_PROGMEM=y, this commit does not cause any functional
differences yet.

Change-Id: I6df8d8b1c33825eff747d71ebb86e56ece9abdaa
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: add new Kconfig entries for external flash
Heesub Shin [Sat, 18 Mar 2017 10:22:38 +0000 (19:22 +0900)]
sidk_s5jt200: add new Kconfig entries for external flash

This commit adds new Kconfig entries for configuring the external flash
memory, SIDK_S5JT200_FLASH_CAPACITY and SIDK_S5JT200_FLASH_PAGE_SIZE.

Change-Id: I6fc2f350f09944ff217f01ba1400d611266797e8
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/sflash: add to support progmem
Heesub Shin [Sat, 18 Mar 2017 07:19:17 +0000 (16:19 +0900)]
s5j/sflash: add to support progmem

This commit implements the progmem interfaces. Though S5J does not have
on-chip flash memory, I cound not find any better design other than
using the progmem.

Change-Id: Ifc6f38b9bd0564754a2ec055e317868cd50e3bc0
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/sflash: allocate sflashdev statically
Heesub Shin [Fri, 17 Mar 2017 12:00:01 +0000 (21:00 +0900)]
s5j/sflash: allocate sflashdev statically

This commit moves dynamic allocation of sflashdev to static allocation.
There is no reason to have it dynamic given that it is never freed once
initialized. In addition, code lines that manage it dynamically occupies
unnecessary binary footprints.

Here is comparison of binary footprints:

                         text       data        bss         dec
    Before (dynamic)     1344          0         19        1363
    After  (static)      1280         20         15        1315

With this commit, overall footprint has reduced 48bytes. Advantage of
static allocation is clear.

Change-Id: I5d12e455c7ad85ee389d17b1b246695062d30bb9
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/sflash: simplify struct s5j_sflash_dev_s
Heesub Shin [Fri, 17 Mar 2017 11:39:46 +0000 (20:39 +0900)]
s5j/sflash: simplify struct s5j_sflash_dev_s

This commit eliminates 'struct s5j_sflash_priv_s' which is a
sub-structure of 'struct s5j_sflash_dev_s'. There is no benefit to do
so.

Change-Id: Ib0d1c1643d09f36440d995035109b518862d15d9
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/sflash: tidy up a bit
Heesub Shin [Fri, 17 Mar 2017 04:04:44 +0000 (13:04 +0900)]
s5j/sflash: tidy up a bit

This commit fixes trivial violations to the coding style, without
causing any functional differences.

Change-Id: I199e4edbafae8df508f2c938bc33057ef578b157
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/sflash: clean up code and add function descriptions
Ivan [Fri, 17 Mar 2017 11:46:31 +0000 (20:46 +0900)]
s5j/sflash: clean up code and add function descriptions

Change-Id: Ib32feaae43b8bb906e6451006367bcd26cb01362
Signed-off-by: Ivan <ivan.galkin@samsung.com>
7 years agos5j/qspi: remove all unnecessary functions
Heesub Shin [Fri, 17 Mar 2017 01:43:08 +0000 (10:43 +0900)]
s5j/qspi: remove all unnecessary functions

There are huge amount of unnecessary functions which are not in use.
Even worse, most of them are static, but their declarations are exported
in public header file. This is completely wrong and should be fixed.

Change-Id: If05660654df1078953cf6c78bf52e6d1e3299bb4
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/qspi: do not read the status while init
Heesub Shin [Fri, 17 Mar 2017 01:41:21 +0000 (10:41 +0900)]
s5j/qspi: do not read the status while init

There is no point in reading the flash status register and printing it
out while initializing QSPI. Don't do it.

Change-Id: I552bebbefb4eee3e7ed5d14da9ee92bf2a4aacb6
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/qspi: tidy up a bit
Heesub Shin [Fri, 17 Mar 2017 01:05:01 +0000 (10:05 +0900)]
s5j/qspi: tidy up a bit

Fixing trivial violations to coding style without introducing any
functional differences at all.

Change-Id: I0317acc4aaf4be7eb6be83e345401c1c010c2c4c
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: clean up s5jt200_boot.c
Heesub Shin [Fri, 17 Mar 2017 00:31:40 +0000 (09:31 +0900)]
sidk_s5jt200: clean up s5jt200_boot.c

Tidy up trivial violation to coding styles, fixing indentations and etc.
without causing functional differences.

Change-Id: I5d83ac883802bd2d9fbaabc5669337c84848588e
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: initialize QSPI earlier
Heesub Shin [Thu, 16 Mar 2017 12:16:18 +0000 (21:16 +0900)]
sidk_s5jt200: initialize QSPI earlier

Change-Id: Iad15ee8cf9c7a8ecd7bf6f3cc70de4330905efd1
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: do not touch the watchdog at boot
Heesub Shin [Thu, 16 Mar 2017 12:09:09 +0000 (21:09 +0900)]
sidk_s5jt200: do not touch the watchdog at boot

Now that the watchdog is disabled by S5J, touching it at the
board-specific initialization stages is unnecessary.

Change-Id: I151bff1a167a357d71523c1c98f38c147915897b
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: disable watchdog at boot
Heesub Shin [Thu, 16 Mar 2017 11:58:09 +0000 (20:58 +0900)]
s5j: disable watchdog at boot

We should disable the watchdog as soon as possible before it barks. The
second stage bootloader of S5J sets up the watchdog in order to detect
boot failure.

Change-Id: I2f657d8d9f7ded5c359baa9ac5c0fd6050fdb2c1
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: fix incorrect timer initialization
Heesub Shin [Thu, 16 Mar 2017 11:20:18 +0000 (20:20 +0900)]
sidk_s5jt200: fix incorrect timer initialization

up_timer_initialize() is called by up_initialize() which is a common
layer for ARM architecture. Calling it from board_app_initialize() is
completely wrong.

Change-Id: I1b90b9cc4e8b54562b45febd1b6e27e375966972
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: tidy up a bit
Heesub Shin [Thu, 16 Mar 2017 10:39:44 +0000 (19:39 +0900)]
sidk_s5jt200: tidy up a bit

This commit cleans up s5jt200_tash.c, removing unnecessary code lines.
It seems to alter quite a lot, but does not introduce any functional
differences.

Change-Id: I2e23d10979e619d4aa76ea11251f9b81cf1230bf
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: introduce s5j_board_initialize()
Heesub Shin [Thu, 16 Mar 2017 10:11:13 +0000 (19:11 +0900)]
s5j: introduce s5j_board_initialize()

This commit introduces a new interface for performing board-specific
initialization at the very early stage of boot. Every board which
derives S5J processor should implement it and initialize resources or
devices.

Change-Id: I693388bacc99ebee899e12f8251deed6c7c579e7

7 years agosidk_s5jt200: add comments on initialization functions
Heesub Shin [Thu, 16 Mar 2017 09:00:17 +0000 (18:00 +0900)]
sidk_s5jt200: add comments on initialization functions

For now, initialization stages are very confusing. For example,
platform-/board-/application-specific things are mixed up in a chaos.

As a preparation step for cleaning up, this commit adds missing comments
that describe its purpose of each initialization function. It will be
very helpful to those who are not aware of it. Most of comments were
copied from NuttX.

Change-Id: I9c5f615a306c83160089039d551cd9fbb8f1b0ec
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: divide code function from s5j_qspi.c
Jihoon Park [Thu, 16 Mar 2017 07:33:12 +0000 (16:33 +0900)]
s5j: divide code function from s5j_qspi.c

NVRAM (Non-Volatile RAM) used by WiFi country code maintanence can be
logically another space and considerd as additional FLASH. s5j_nvram.c
provides APIs that only used for nvram access, so s5j_qspi.c does not
have nvram function and keep s5j_qspi_xxx naming rule.

Change-Id: I382c6e2665974ffcd06fa2f459e5d5d549ab2c76
Signed-off-by: Jihoon Park <jh6186.park@samsung.com>
7 years agosidk_s5jt200: add init fifo routine for IPC between supplicant and WiFi API
EunBong Song [Thu, 16 Mar 2017 06:53:29 +0000 (15:53 +0900)]
sidk_s5jt200: add init fifo routine for IPC between supplicant and WiFi API

This patch adds init fifo routine for IPC between supplicant and WiFi API

Change-Id: I333377ff5dfc1280a02d56b3abda533d7c12ce69
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agosidk_s5jt200: enable network commands
EunBong Song [Thu, 16 Mar 2017 04:36:25 +0000 (13:36 +0900)]
sidk_s5jt200: enable network commands

This commit enables network-related tash commands(e.g. ping, ifconfig,
ifdown, ifup) in sidk_tash_wlan defconfig.

Change-Id: I8ee6a65c7dc9134b177e403fab4e746108286979
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agosidk_s5jt200: fix memorymap and disable watchdog temporally
Jihoon Park [Thu, 16 Mar 2017 01:38:37 +0000 (10:38 +0900)]
sidk_s5jt200: fix memorymap and disable watchdog temporally

fix memorymap for lastest partition map, and make room for WiFi F/W to
be sat on front of OS area.
BL1 - 0x0400_0000
BL2 - 0x0401_0000
OS  - 0x040C_8000
WLAN- 0x0404_8000
fusing script(cfg, cmm) has also changed to load each binary on proper
place.

watchdog function temprally disabled, because bl2 enables watchdog rese
t during boot-up time. This will be managed by periodic timer interrupt

Change-Id: I225aa538fdbcd7d3a399e09e7dd9b0de7074695e
Signed-off-by: Jihoon Park <jh6186.park@samsung.com>
7 years agos5g/gpio: cleaned up gpio driver
Ivan [Wed, 15 Mar 2017 17:17:07 +0000 (02:17 +0900)]
s5g/gpio: cleaned up gpio driver

Driver code is cleaned and arranged in accordance with requirements.

Change-Id: I1af335f6f82d9ce93290a4920d127c0209724cab
Signed-off-by: Ivan <ivan.galkin@samsung.com>
7 years agos5j/qspi: added WiFi nvram function
Jihoon Park [Wed, 15 Mar 2017 07:24:28 +0000 (16:24 +0900)]
s5j/qspi: added WiFi nvram function

WiFi functions needs Nv_Write/Nv_Read API for its contry code. The APIs
 are applied by this patches and include naming changes

Nv_Write/Nv_Read , s5j_qspi_nv_write/nv_read() both are supported for c
ompatibility.

create include/s5j/nvram.h as dummy, this would be removed

Fixes: Id96b4c837bc379a167(
s5j/qspi : clean up unnecessary function and support 80Mhz/QUADIO)

Change-Id: I353e24ee1a9cf7da52913d78a5f2832f19b665ca
Signed-off-by: Jihoon Park <jh6186.park@samsung.com>
7 years agos5j: sidk_s5jt200: convert kbytes unit to bytes
Heesub Shin [Tue, 14 Mar 2017 10:33:52 +0000 (19:33 +0900)]
s5j: sidk_s5jt200: convert kbytes unit to bytes

It is very confusing to mix up numerical units on configurations. We
need consistency on numerical values. This commit changes all
KByte-unit numbers to Bytes.

Change-Id: Icfbeb11ea5f616864be86b78f14f5ba8ba86f32a
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/qspi: clean up unnecessary function and support 80Mhz/QUADIO
Jihoon Park [Tue, 14 Mar 2017 05:11:13 +0000 (14:11 +0900)]
s5j/qspi: clean up unnecessary function and support 80Mhz/QUADIO

provides initialize FLASH function. The GPIO is not set for FLASH
control, and clock for FLASH is 40Mhz as default. After s5j_qspi_init(),
GPIO sets to CS/SO/SI/WP/HLD signal and can control FLASH. The Clock
incresed by 80Mhz with QUAD_IO mode for enhanced perfomance.

Change-Id: Id96b4c837bc379a167b0fa548a27f625cfc3cd73
Signed-off-by: Jihoon Park <jh6186.park@samsung.com>
7 years agos5j/serial: cleaned serial driver code
Ivan [Tue, 14 Mar 2017 13:58:20 +0000 (22:58 +0900)]
s5j/serial: cleaned serial driver code

UART code is cleaned and arranged in accordance with requirements.

Change-Id: Ia7c6c6f2f4dd73dad77f12640041b3c732e1b8cf
Signed-off-by: Ivan <ivan.galkin@samsung.com>
7 years agos5j/boot: remove unnecessary include
Heesub Shin [Tue, 14 Mar 2017 08:57:50 +0000 (17:57 +0900)]
s5j/boot: remove unnecessary include

There is no point in including board-specific headers. Moreover, it is
not necessary to do so.

Change-Id: I3af8d9a8369d5552e4907018c8ee9d6ffacab6ee
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoarmv7-r: do not allocate MPU region manually
Heesub Shin [Tue, 14 Mar 2017 08:24:32 +0000 (17:24 +0900)]
armv7-r: do not allocate MPU region manually

MPU region configurations are specific to chipset or boards. This means
that the number of regions supported or how to configure each region
depends on the chipset or board. In other words, common OS layer should
not assume which region would have a specific usage. For this reasons,
current implementation of MPU is completely wrong and broken.

As a preparation step for correcting it, this commit fixes the code that
manually allocates MPU region identifiers. mpu_allocregion() should be
used instead. This change might break the protected build, but it was
already broken and malfunctioning by itself. So, this commit does not
introduce any harm or cause any functional differences at all, though it
seems to alter quite a lot.

It also removes redundant calls to mpu_control().

Change-Id: I747a87c566f671ad198c3e20a97e9f929cb45eb5
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoarmv7-r: bring back the declaration of mpu_allocregion()
Heesub Shin [Tue, 14 Mar 2017 08:17:04 +0000 (17:17 +0900)]
armv7-r: bring back the declaration of mpu_allocregion()

mpu_allocregion() seems to have been deleted (or intentionally) deleted.
Its definition is still in armv7-r/arm_mpu.c and we need it. This commit
brings it back.

Change-Id: I404b8ec0a016151db2bc7651b85ae97a17a8f295
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: assume CONFIG_ARCH_LOWVECTORS=n always
Heesub Shin [Tue, 14 Mar 2017 08:14:33 +0000 (17:14 +0900)]
s5j: assume CONFIG_ARCH_LOWVECTORS=n always

S5J always uses the high vector. So, we do not need to consider the case
of CONFIG_ARCH_LOWVECTORS=y. This commit removes unnecessary codes for
it.

Change-Id: If48c987f82c372a32a8b03103d9a042e020848bf
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: update SSS firmware
Junyeon Lee [Tue, 14 Mar 2017 04:58:46 +0000 (13:58 +0900)]
sidk_s5jt200: update SSS firmware

This commit updates the SSS firmware to the latest version released at
Dec 30, 2016.

Key features
  . Acceleration
    - RSA, ECDSA digital signature sign/verification
    - AES encrypt, decrypt and several hash, hmac algorithm
    - generate and calcaulate DH, ECDH parameters

  . etc
    - generate true random number
    - encrypt and decrypt data based on PUF

Change-Id: I4007f6374ed121dbcb84e233e09b5ffa0bcf301b
Signed-off-by: Junyeon Lee <junyeon2.lee@samsung.com>
7 years agos5j/sss: add static library and header files
Junyeon Lee [Tue, 14 Mar 2017 04:43:52 +0000 (13:43 +0900)]
s5j/sss: add static library and header files

This commit adds driver and header files for SSS released at Dec 30,
2016.

Change-Id: I69dcc5045528aee1b27069e5250393da703104d8
Signed-off-by: Junyeon Lee <junyeon2.lee@samsung.com>
7 years agosidk_s5jt200: fix compilation error s5jt200_tash.c
EunBong Song [Tue, 14 Mar 2017 04:29:37 +0000 (13:29 +0900)]
sidk_s5jt200: fix compilation error s5jt200_tash.c

This patch fixes a compilation error caused when CONFIG_S5J_SFLASH=n.

Change-Id: I8d7c331f371f306f1d15ca514752af67723b6783
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoarmv7-r/mpu: remove mpu_show_regioninfo()
Heesub Shin [Tue, 14 Mar 2017 03:31:10 +0000 (12:31 +0900)]
armv7-r/mpu: remove mpu_show_regioninfo()

mpu_show_regioninfo() shows MPU configurations for debugging purpose.
Though it might be useful and provide meaningful information to BSP
developers, there are already another tools for them to examine MPU
settings. To normal users, it only increases binary footprint almost
half kilobyte.

Here is footprint comparison with this commit:

                text   data    bss      dec filename
    Before      2568      0      5     2573 arm_assert.c
     After      2148      0      5     2153 arm_assert.c

Let's drop it.

Change-Id: Ia20e92f7380c2d56516f1b229836e08354d9c5ea
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoarmv7-r/mpu: remove unnecessary ifdef
Heesub Shin [Tue, 14 Mar 2017 02:44:37 +0000 (11:44 +0900)]
armv7-r/mpu: remove unnecessary ifdef

'armv7-r/mpu.h' is included only when CONFIG_ARCH_CORTEXR4=y. So, it is
always CONFIG_ARCH_CORTEXR4 is defined and we do not need to check or
have codes for the opposite case.

Change-Id: Ia5a46127e187a9b7b0ccf09cf0618443b47d80bf
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoarmv7-r/mpu: clean up inconsistent indentations
Heesub Shin [Tue, 14 Mar 2017 02:34:51 +0000 (11:34 +0900)]
armv7-r/mpu: clean up inconsistent indentations

Fix inconsistent indentation in mpu.h for better readability. This
commit does not introduce any functional differences.

Change-Id: Ic9209c9e187c2a1153bc9c058f29c776c4ed6109
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: remove private definition of errno
EunBong Song [Mon, 13 Mar 2017 10:05:44 +0000 (19:05 +0900)]
s5j: remove private definition of errno

Remove private errno definition in s5j_types.h. This patch also changes
s5j gpio driver to use common errno header.

Change-Id: Ia6413332081b21d428520037d24fcc8515e7ac40
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agosidk_s5jt200: remove unnecessary outputs in linker script
Heesub Shin [Mon, 13 Mar 2017 08:27:02 +0000 (17:27 +0900)]
sidk_s5jt200: remove unnecessary outputs in linker script

Now that the s5j/pwrcal driver has been simplified, some outputs in
.data section can be eliminated. .wlbt section also can be removed as it
is not in use. This commit also fixes indentations.

Change-Id: I92a4fb2c9568f9974d6ce73f8b965866e9acf473
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: calibrate CONFIG_BOARD_LOOPSPERMSEC
EunBong Song [Mon, 13 Mar 2017 04:01:10 +0000 (13:01 +0900)]
sidk_s5jt200: calibrate CONFIG_BOARD_LOOPSPERMSEC

According to my experiment, CONFIG_BOARD_LOOPSPERMSEC should have 29100,
which is an accurate value for the current configuration of
ARTIK-051/053 evaluation board at this time.

Change-Id: Ie76b340611db99ce759a07ad8e52d08aa76b8a08
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agosidk_s5jt200: optimize for minimum code size
EunBong Song [Mon, 13 Mar 2017 02:46:28 +0000 (11:46 +0900)]
sidk_s5jt200: optimize for minimum code size

This commit changes the optimization level and linker options for
reducing binary footprint for 'hello_with_tash' configuration.

Change-Id: I87279b54ee1c8df63e1d00be98d3f94921b0984d
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agos5j/gpio: fix compilation error when CONFIG_SCHED_WORKQUEUE=n
EunBong Song [Mon, 13 Mar 2017 01:59:33 +0000 (10:59 +0900)]
s5j/gpio: fix compilation error when CONFIG_SCHED_WORKQUEUE=n

When CONFIG_SCHED_WORKQUEUE is not enabled, gpio driver should not use
work queue function. If not, compilation fails.

Change-Id: I2f98874107f0ca2289066850da29d3dec28f371e
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agos5j/wifi: add static libraries of pre-release 1.01
Ivan [Mon, 13 Mar 2017 11:27:55 +0000 (20:27 +0900)]
s5j/wifi: add static libraries of pre-release 1.01

Added wifi libraries to provide wireless functionality.

This commit adds library files for the wifi subsystem on s5jt200 in a
pre-release version of 1.01. This will fix some linker issues for the
slsiwifi app.

Signed-off-by: Ivan <ivan.galkin@samsung.com>
Signed-off-by: Kim Schulz <k.schulz@samsung.com>
[Shin: merged commits from Ivan's and Schulz into a single commit]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/efuse: add s5j_efuse_get_mac_addr()
Ivan [Mon, 13 Mar 2017 10:44:32 +0000 (19:44 +0900)]
s5j/efuse: add s5j_efuse_get_mac_addr()

To get WLAN driver work, we need to implement s5j_efuse_get_mac_addr()
which reads MAC address from OTP area. This commit can be reverted
after the WLAN driver can read it by itself.

Change-Id: Ida4dcc32c57605f2df33fb68d6b2bf5223b2f83d
Signed-off-by: Ivan <ivan.galkin@samsung.com>
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agolwip/dhcps: fix to prevent assertion when duplicated start
Jin-Seong Kim [Wed, 23 Nov 2016 08:25:54 +0000 (17:25 +0900)]
lwip/dhcps: fix to prevent assertion when duplicated start

This commit fixes:
 - duplicated dhcps_start function causes dereference of freed
   dhcps_pcb, so invalid pointer can be dereferenced
 - when dhcps_pcb exists, call udp_new function to allocate dhcps_pcb
   newly on udp_pcb linked list

how to test
 1) start Wi-Fi AP mode (softap)
 2) dhcps start
 3) another dhcps start (duplicated start dhcp server)
 4) join Wi-Fi device to the softap and run dhcp client

Change-Id: Id5b4fc51576dfe99f401c1590ac1e7074b849757
Signed-off-by: jseong82.kim <jseong82.kim@samsung.com>
7 years agolwip/dhcp: change de-initialization value of netmask
Jin-Seong Kim [Wed, 21 Dec 2016 02:37:32 +0000 (11:37 +0900)]
lwip/dhcp: change de-initialization value of netmask

Netmask of IP_ADDR_ANY is 0.0.0.0, it causes wrong netif assignment due
to wrong ip address comparsion with 0.0.0.0 netmask. ip_route may not
work properly with netmask 0.0.0.0.

Change-Id: I57a0f514e5e7ba58d94d6feb37c0f9f96a016709
Signed-off-by: jseong82.kim <jseong82.kim@samsung.com>
7 years agolwip/dhcp: clear IP address information when dhcp_stop
Changsoon Kim [Wed, 30 Nov 2016 16:43:45 +0000 (01:43 +0900)]
lwip/dhcp: clear IP address information when dhcp_stop

It fixed to clear IP address, gateway, netmask infomation in dhcp_stop.

Change-Id: I16364415dd5f88ac63676acec2427784af015459
Signed-off-by: Changsoon Kim <cs0424.kim@samsung.com>
7 years agolwip/dhcps: fix improper use of inet_addr()
EunBong Song [Fri, 25 Nov 2016 05:13:25 +0000 (14:13 +0900)]
lwip/dhcps: fix improper use of inet_addr()

Change-Id: Ic639d704ac83aea2d16265f6c01862df7ef8e3a6
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agobuild: sidk_s5jt200: do not put binary header manually
Heesub Shin [Mon, 13 Mar 2017 01:06:49 +0000 (10:06 +0900)]
build: sidk_s5jt200: do not put binary header manually

This commit simplifies the build script. Instead of putting the
placeholder for NS2 header into the raw binary, we can do the same thing
with the linker scripts more easily.

This removes a Kconfig entry, CONFIG_DISABLE_MAKING_BINARY_HEADER also.
It is replaced by CONFIG_SAMSUNG_NS2.

Change-Id: I86d057e85f8bfce415c492decb670a7bb6c36df0
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agobuild: s5j: introduce a new kconfig, CONFIG_SAMSUNG_NS2
Heesub Shin [Mon, 13 Mar 2017 00:52:50 +0000 (09:52 +0900)]
build: s5j: introduce a new kconfig, CONFIG_SAMSUNG_NS2

Bootloader of S5J platform requires the raw binary to have SHA256
checksum and some magic numbers at the first 32bytes of the binary.
Second stage boot loaders checks it to verify the integrity.

This commit introduces a new Kconfig entry, CONFIG_SAMSUNG_NS2, and a
small python script for putting SHA256 checksum into the header.

Change-Id: I95b24d97094b2c9c87ee1b30a6fb7883fed9fc64
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agobuild: do not build OTA binaries
Heesub Shin [Mon, 13 Mar 2017 00:22:32 +0000 (09:22 +0900)]
build: do not build OTA binaries

Current build scripts creates additional output binaries when OTA is
enabled. This behavior is completely wrong, because it applies only to
S5J. In addition, now that the S5J has dropped to support FOTA, there is
no point in doing that.

Change-Id: I41fbdf7611abfad4bf597144253d91ab7260fe8a
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: remove FOTA remnants
Heesub Shin [Mon, 13 Mar 2017 00:20:56 +0000 (09:20 +0900)]
s5j: remove FOTA remnants

Now that no boards based on s5j support OTA, s5j has no reason to
support FOTA. Let's remove all remnants for FOTA in S5J.

Change-Id: I323ff009672ce620524649b2fe8069ba16043c1b
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: drop to support FOTA
Heesub Shin [Mon, 13 Mar 2017 00:17:40 +0000 (09:17 +0900)]
sidk_s5jt200: drop to support FOTA

Current implementation of FOTA support is broken. It should be
redesigned to meet BL2 requirements. Let's drop it. This commit removes
all board-level considerations for supporting OTA. As no configurations
depend on the OTA at this moment, it will not cause any harm.

Change-Id: Ic8e5fcdcbef69dcb36ec1141e9f20b2075b5f593
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>