Skip to content

Commit

Permalink
imx6ull-flashnor: improve build
Browse files Browse the repository at this point in the history
JIRA: RTOS-484
  • Loading branch information
badochov authored and nalajcie committed Jul 14, 2023
1 parent 878ccbb commit 520b994
Show file tree
Hide file tree
Showing 19 changed files with 31 additions and 26 deletions.
2 changes: 1 addition & 1 deletion _targets/Makefile.armv7a7-imx6ull
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Copyright 2019 Phoenix Systems
#

DEFAULT_COMPONENTS := imx6ull-sdma imx6ull-gpio libimx6ull-ecspi
DEFAULT_COMPONENTS := imx6ull-sdma imx6ull-gpio libimx6ull-ecspi libimx6ull-qspi
DEFAULT_COMPONENTS += imx6ull-flash
DEFAULT_COMPONENTS += imx6ull-flashnor
DEFAULT_COMPONENTS += libusbclient cdc-demo
Expand Down
2 changes: 1 addition & 1 deletion adc/ad7779/imx6ull/spi.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <unistd.h>
#include <sys/msg.h>

#include <ecspi.h>
#include <imx6ull-ecspi.h>

#include "../ad7779.h"

Expand Down
1 change: 0 additions & 1 deletion spi/imx6ull-ecspi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@

NAME := libimx6ull-ecspi
LOCAL_SRCS := libecspi.c
LOCAL_HEADERS := ecspi.h
include $(static-lib.mk)
File renamed without changes.
2 changes: 1 addition & 1 deletion spi/imx6ull-ecspi/libecspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <phoenix/arch/imx6ull.h>

#include "ecspi.h"
#include "imx6ull-ecspi.h"


#define BYTES_2_RXTHRESHOLD(LEN) (((LEN) + 3) / 4 - 1)
Expand Down
1 change: 0 additions & 1 deletion spi/imx6ull-qspi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@

NAME := libimx6ull-qspi
LOCAL_SRCS := qspi.c
LOCAL_HEADERS := qspi.h
include $(static-lib.mk)
File renamed without changes.
2 changes: 1 addition & 1 deletion spi/imx6ull-qspi/qspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <string.h>
#include <errno.h>

#include "qspi.h"
#include "imx6ull-qspi.h"


#define QSPI_LUT (0x310u / sizeof(uint32_t))
Expand Down
15 changes: 11 additions & 4 deletions storage/imx6ull-flashnor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@
# Copyright 2021 Phoenix Systems
#


NAME := libflashnordrv-imx6ull
LOCAL_SRCS := flashnor-ecspi.c flashnor-qspi.c flashnor-drv.c nor.c
LOCAL_HEADERS := imx6ull-flashnor-ecspi.h imx6ull-flashnor-qspi.h imx6ull-flashnor-drv.h imx6ull-nor.h
DEPS := libimx6ull-ecspi libimx6ull-qspi

include $(static-lib.mk)

NAME := imx6ull-flashnor
LOCAL_SRCS := flashnor.c flashnor-ecspi.c flashnor-qspi.c flashnor-drv.c nor/nor.c
LOCAL_HEADERS := flashnor-ecspi.h flashnor-qspi.h flashnor-drv.h nor/nor.h
DEP_LIBS := libimx6ull-ecspi libimx6ull-qspi
LOCAL_SRCS := flashnor-srv.c
DEP_LIBS := libflashnordrv-imx6ull libimx6ull-ecspi libimx6ull-qspi
LIBS := libmeterfs-storage libmeterfs libstorage libjffs2 libmtd
LOCAL_INSTALL_PATH := /sbin

Expand All @@ -16,6 +23,6 @@ include $(binary.mk)
# NOR flash test program
NAME := flashnor-test
LOCAL_SRCS := flashnor-test.c
LIBS :=
DEP_LIBS := libflashnordrv-imx6ull libimx6ull-ecspi libimx6ull-qspi

include $(binary.mk)
2 changes: 1 addition & 1 deletion storage/imx6ull-flashnor/flashnor-drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <stdlib.h>
#include <sys/threads.h>

#include "flashnor-drv.h"
#include "imx6ull-flashnor-drv.h"


struct _storage_devCtx_t {
Expand Down
4 changes: 2 additions & 2 deletions storage/imx6ull-flashnor/flashnor-ecspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

#include <sys/types.h>

#include <ecspi.h>
#include <imx6ull-ecspi.h>

#include "flashnor-ecspi.h"
#include "imx6ull-flashnor-ecspi.h"


enum {
Expand Down
6 changes: 3 additions & 3 deletions storage/imx6ull-flashnor/flashnor-qspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
#include <stdio.h>
#include <errno.h>
#include <sys/threads.h>
#include <qspi.h>
#include <imx6ull-qspi.h>

#include "nor/nor.h"
#include "flashnor-drv.h"
#include "imx6ull-nor.h"
#include "imx6ull-flashnor-drv.h"


#define MIN(a, b) ({ \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
#include <meterfs_storage.h>
#include <storage/storage.h>

#include "flashnor-ecspi.h"
#include "flashnor-qspi.h"
#include "flashnor-drv.h"
#include "imx6ull-flashnor-ecspi.h"
#include "imx6ull-flashnor-qspi.h"
#include "imx6ull-flashnor-drv.h"


/* Default registered device files prefix and starting ID */
Expand Down
6 changes: 3 additions & 3 deletions storage/imx6ull-flashnor/flashnor-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#include <stdlib.h>
#include <string.h>

#include "flashnor-ecspi.h"
#include "flashnor-qspi.h"
#include "flashnor-drv.h"
#include "imx6ull-flashnor-ecspi.h"
#include "imx6ull-flashnor-qspi.h"
#include "imx6ull-flashnor-drv.h"


static unsigned valcmp(uint8_t *buf, size_t len, uint8_t val)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <unistd.h>

#include "flashnor-drv.h"
#include "imx6ull-flashnor-drv.h"


extern int flashnor_ecspiInit(int ndev, flashnor_info_t *info);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#ifndef _FLASHNOR_QSPI_H_
#define _FLASHNOR_QSPI_H_

#include "flashnor-drv.h"
#include "imx6ull-flashnor-drv.h"


extern int flashnor_qspiInit(int ndev, flashnor_info_t *info);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#ifndef _QSPI_NOR_H_
#define _QSPI_NOR_H_

#include <qspi.h>
#include <imx6ull-qspi.h>

#define NOR_ERASED_STATE 0xff
#define NOR_DEFAULT_TIMEOUT 10000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <stdio.h>
#include <errno.h>

#include "nor.h"
#include "imx6ull-nor.h"

/* clang-format off */
#define FLASH_ID(vid, pid) (((vid) & 0xffu) | ((pid) & 0xff00u) | (((pid) & 0xffu) << 16))
Expand Down

0 comments on commit 520b994

Please sign in to comment.